import dart:core as core in the generated code (#217)

diff --git a/protoc_plugin/CHANGELOG.md b/protoc_plugin/CHANGELOG.md
index b982292..268bf46 100644
--- a/protoc_plugin/CHANGELOG.md
+++ b/protoc_plugin/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 16.0.2
+
+* Generated files now import 'dart:core' with a prefix
+* Add 'camel_case_types' to analysis_options and add it in the 'ignore_for_file' header of the generated files.
+
 ## 16.0.1
 
 * Add `DateTime` conversion methods to `google.protobuf.Timestamp`.
diff --git a/protoc_plugin/analysis_options.yaml b/protoc_plugin/analysis_options.yaml
index 1844c97..e3ba296 100644
--- a/protoc_plugin/analysis_options.yaml
+++ b/protoc_plugin/analysis_options.yaml
@@ -21,3 +21,4 @@
     - unrelated_type_equality_checks
     - use_rethrow_when_possible
     - valid_regexps
+    - camel_case_types
diff --git a/protoc_plugin/lib/base_type.dart b/protoc_plugin/lib/base_type.dart
index 028543c..13e44a1 100644
--- a/protoc_plugin/lib/base_type.dart
+++ b/protoc_plugin/lib/base_type.dart
@@ -53,7 +53,7 @@
           : prefixed;
 
   String getRepeatedDartType(FileGenerator fileGen) =>
-      "List<${getDartType(fileGen)}>";
+      "$_coreImportPrefix.List<${getDartType(fileGen)}>";
 
   factory BaseType(FieldDescriptorProto field, GenerationContext ctx) {
     String constSuffix;
@@ -61,28 +61,28 @@
     switch (field.type) {
       case FieldDescriptorProto_Type.TYPE_BOOL:
         return const BaseType._raw(FieldDescriptorProto_Type.TYPE_BOOL, "B",
-            "bool", r"$_setBool", null);
+            "$_coreImportPrefix.bool", r"$_setBool", null);
       case FieldDescriptorProto_Type.TYPE_FLOAT:
         return const BaseType._raw(FieldDescriptorProto_Type.TYPE_FLOAT, "F",
-            "double", r"$_setFloat", null);
+            "$_coreImportPrefix.double", r"$_setFloat", null);
       case FieldDescriptorProto_Type.TYPE_DOUBLE:
         return const BaseType._raw(FieldDescriptorProto_Type.TYPE_DOUBLE, "D",
-            "double", r"$_setDouble", null);
+            "$_coreImportPrefix.double", r"$_setDouble", null);
       case FieldDescriptorProto_Type.TYPE_INT32:
         return const BaseType._raw(FieldDescriptorProto_Type.TYPE_INT32, "3",
-            "int", r"$_setSignedInt32", null);
+            "$_coreImportPrefix.int", r"$_setSignedInt32", null);
       case FieldDescriptorProto_Type.TYPE_UINT32:
         return const BaseType._raw(FieldDescriptorProto_Type.TYPE_UINT32, "U3",
-            "int", r"$_setUnsignedInt32", null);
+            "$_coreImportPrefix.int", r"$_setUnsignedInt32", null);
       case FieldDescriptorProto_Type.TYPE_SINT32:
         return const BaseType._raw(FieldDescriptorProto_Type.TYPE_SINT32, "S3",
-            "int", r"$_setSignedInt32", null);
+            "$_coreImportPrefix.int", r"$_setSignedInt32", null);
       case FieldDescriptorProto_Type.TYPE_FIXED32:
         return const BaseType._raw(FieldDescriptorProto_Type.TYPE_FIXED32, "F3",
-            "int", r"$_setUnsignedInt32", null);
+            "$_coreImportPrefix.int", r"$_setUnsignedInt32", null);
       case FieldDescriptorProto_Type.TYPE_SFIXED32:
         return const BaseType._raw(FieldDescriptorProto_Type.TYPE_SFIXED32,
-            "SF3", "int", r"$_setSignedInt32", null);
+            "SF3", "$_coreImportPrefix.int", r"$_setSignedInt32", null);
       case FieldDescriptorProto_Type.TYPE_INT64:
         return const BaseType._raw(FieldDescriptorProto_Type.TYPE_INT64, "6",
             "Int64", r"$_setInt64", null);
@@ -100,10 +100,14 @@
             "SF6", "Int64", r"$_setInt64", null);
       case FieldDescriptorProto_Type.TYPE_STRING:
         return const BaseType._raw(FieldDescriptorProto_Type.TYPE_STRING, "S",
-            "String", r"$_setString", null);
+            "$_coreImportPrefix.String", r"$_setString", null);
       case FieldDescriptorProto_Type.TYPE_BYTES:
-        return const BaseType._raw(FieldDescriptorProto_Type.TYPE_BYTES, "Y",
-            "List<int>", r"$_setBytes", null);
+        return const BaseType._raw(
+            FieldDescriptorProto_Type.TYPE_BYTES,
+            "Y",
+            "$_coreImportPrefix.List<$_coreImportPrefix.int>",
+            r"$_setBytes",
+            null);
 
       case FieldDescriptorProto_Type.TYPE_GROUP:
         constSuffix = "G";
diff --git a/protoc_plugin/lib/enum_generator.dart b/protoc_plugin/lib/enum_generator.dart
index 06958bd..254bbb1 100644
--- a/protoc_plugin/lib/enum_generator.dart
+++ b/protoc_plugin/lib/enum_generator.dart
@@ -148,7 +148,7 @@
       }
       out.println();
 
-      out.println('static const List<${classname}> values ='
+      out.println('static const $_coreImportPrefix.List<${classname}> values ='
           ' const <${classname}> [');
       for (EnumValueDescriptorProto val in _canonicalValues) {
         final name = dartNames[val.name];
@@ -157,13 +157,15 @@
       out.println('];');
       out.println();
 
-      out.println('static final Map<int, $classname> _byValue ='
+      out.println(
+          'static final $_coreImportPrefix.Map<$_coreImportPrefix.int, $classname> _byValue ='
           ' $_protobufImportPrefix.ProtobufEnum.initByValue(values);');
-      out.println('static ${classname} valueOf(int value) =>'
+      out.println('static ${classname} valueOf($_coreImportPrefix.int value) =>'
           ' _byValue[value];');
       out.println();
 
-      out.println('const ${classname}._(int v, String n) '
+      out.println(
+          'const ${classname}._($_coreImportPrefix.int v, $_coreImportPrefix.String n) '
           ': super(v, n);');
     });
   }
diff --git a/protoc_plugin/lib/file_generator.dart b/protoc_plugin/lib/file_generator.dart
index e557d1f..11971d6 100644
--- a/protoc_plugin/lib/file_generator.dart
+++ b/protoc_plugin/lib/file_generator.dart
@@ -8,10 +8,12 @@
 final _formatter = new DartFormatter();
 final String _protobufImportPrefix = r'$pb';
 final String _asyncImportPrefix = r'$async';
+const String _coreImportPrefix = r'$core';
 final String _grpcImportPrefix = r'$grpc';
 final String _protobufImport =
     "import 'package:protobuf/protobuf.dart' as $_protobufImportPrefix;";
 final String _asyncImport = "import 'dart:async' as $_asyncImportPrefix;";
+final String _coreImport = "import 'dart:core' as $_coreImportPrefix";
 final String _grpcImport =
     "import 'package:grpc/service_api.dart' as $_grpcImportPrefix;";
 
@@ -292,10 +294,9 @@
       out.println(_asyncImport);
     }
 
-    // Make sure any other symbols in dart:core don't cause name conflicts with
-    // protobuf classes that have the same name.
-    out.println("// ignore: UNUSED_SHOWN_NAME\n"
-        "import 'dart:core' show int, bool, double, String, List, Map, override;\n");
+    out.println('// ignore: UNUSED_SHOWN_NAME');
+    out.println(
+        '$_coreImport show int, bool, double, String, List, Map, override;\n');
 
     if (_needsFixnumImport) {
       out.println("import 'package:fixnum/fixnum.dart';");
@@ -420,8 +421,8 @@
     if (enumCount > 0) {
       // Make sure any other symbols in dart:core don't cause name conflicts
       // with enums that have the same name.
-      out.println("// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME\n"
-          "import 'dart:core' show int, dynamic, String, List, Map;");
+      out.println("// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME");
+      out.println("$_coreImport show int, dynamic, String, List, Map;");
       out.println(_protobufImport);
       out.println();
     }
@@ -457,6 +458,8 @@
       out.println(_asyncImport);
       out.println();
       out.println(_protobufImport);
+      out.println();
+      out.println("$_coreImport show String, Map, ArgumentError, dynamic;");
     }
 
     // Import .pb.dart files needed for requests and responses.
@@ -496,6 +499,8 @@
     out.println(_asyncImport);
     out.println();
     out.println(_grpcImport);
+    out.println();
+    out.println("$_coreImport show int, String, List;\n");
 
     // Import .pb.dart files needed for requests and responses.
     var imports = new Set<FileGenerator>();
@@ -569,7 +574,7 @@
 //  Generated code. Do not modify.
 //  source: ${descriptor.name}
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 ''');
   }
 
diff --git a/protoc_plugin/lib/grpc_generator.dart b/protoc_plugin/lib/grpc_generator.dart
index 6e5579c..a8a5315 100644
--- a/protoc_plugin/lib/grpc_generator.dart
+++ b/protoc_plugin/lib/grpc_generator.dart
@@ -127,7 +127,8 @@
   void _generateService(IndentingWriter out) {
     out.addBlock('abstract class $_serviceClassname extends $_service {', '}',
         () {
-      out.println('String get \$name => \'$_fullServiceName\';');
+      out.println(
+          '$_coreImportPrefix.String get \$name => \'$_fullServiceName\';');
       out.println();
       out.addBlock('$_serviceClassname() {', '}', () {
         for (final method in _methods) {
@@ -219,7 +220,7 @@
     out.println('    \'/$_serviceName/$_grpcName\',');
     out.println('    ($_requestType value) => value.writeToBuffer(),');
     out.println(
-        '    (List<int> value) => new $_responseType.fromBuffer(value));');
+        '    ($_coreImportPrefix.List<$_coreImportPrefix.int> value) => new $_responseType.fromBuffer(value));');
   }
 
   void generateClientStub(IndentingWriter out) {
@@ -247,7 +248,7 @@
     out.println('    $_clientStreaming,');
     out.println('    $_serverStreaming,');
     out.println(
-        '    (List<int> value) => new $_requestType.fromBuffer(value),');
+        '    ($_coreImportPrefix.List<$_coreImportPrefix.int> value) => new $_requestType.fromBuffer(value),');
     out.println('    ($_responseType value) => value.writeToBuffer()));');
   }
 
diff --git a/protoc_plugin/lib/message_generator.dart b/protoc_plugin/lib/message_generator.dart
index c53facf..abef4e7 100644
--- a/protoc_plugin/lib/message_generator.dart
+++ b/protoc_plugin/lib/message_generator.dart
@@ -320,7 +320,7 @@
     ], () {
       for (OneofNames oneof in _oneofNames) {
         out.addBlock(
-            'static const Map<int, ${oneof.oneofEnumName}> ${oneof.byTagMapName} = {',
+            'static const $_coreImportPrefix.Map<$_coreImportPrefix.int, ${oneof.oneofEnumName}> ${oneof.byTagMapName} = {',
             '};', () {
           for (ProtobufField field in _oneofFields[oneof.index]) {
             out.println(
@@ -360,10 +360,11 @@
       out.println();
 
       out.println('${classname}() : super();');
-      out.println('${classname}.fromBuffer(List<int> i,'
+      out.println(
+          '${classname}.fromBuffer($_coreImportPrefix.List<$_coreImportPrefix.int> i,'
           ' [$_protobufImportPrefix.ExtensionRegistry r = $_protobufImportPrefix.ExtensionRegistry.EMPTY])'
           ' : super.fromBuffer(i, r);');
-      out.println('${classname}.fromJson(String i,'
+      out.println('${classname}.fromJson($_coreImportPrefix.String i,'
           ' [$_protobufImportPrefix.ExtensionRegistry r = $_protobufImportPrefix.ExtensionRegistry.EMPTY])'
           ' : super.fromJson(i, r);');
       out.println('${classname} clone() =>'
@@ -459,7 +460,7 @@
     _emitOverrideIf(field.overridesGetter, out);
     final getterExpr = _getterExpression(fieldTypeString, field.index,
         defaultExpr, field.isRepeated, field.isMapField);
-    out.println('${fieldTypeString} get ${names.fieldName} => ${getterExpr};');
+    out.println('$fieldTypeString get ${names.fieldName} => ${getterExpr};');
 
     if (field.isRepeated) {
       if (field.overridesSetter) {
@@ -489,7 +490,7 @@
             ' }');
       }
       _emitOverrideIf(field.overridesHasMethod, out);
-      out.println('bool ${names.hasMethodName}() =>'
+      out.println('$_coreImportPrefix.bool ${names.hasMethodName}() =>'
           ' \$_has(${field.index});');
       _emitOverrideIf(field.overridesClearMethod, out);
       out.println('void ${names.clearMethodName}() =>'
@@ -502,7 +503,7 @@
     if (isMapField) {
       return '\$_getMap($index)';
     }
-    if (fieldType == 'String') {
+    if (fieldType == '$_coreImportPrefix.String') {
       return '\$_getS($index, $defaultExpr)';
     }
     if (fieldType == 'Int64' && defaultExpr == 'null') {
@@ -516,7 +517,7 @@
 
   void _emitOverrideIf(bool condition, IndentingWriter out) {
     if (condition) {
-      out.println('@override');
+      out.println('@$_coreImportPrefix.override');
     }
   }
 
diff --git a/protoc_plugin/lib/protobuf_field.dart b/protoc_plugin/lib/protobuf_field.dart
index aaf4ee5..785c8fb 100644
--- a/protoc_plugin/lib/protobuf_field.dart
+++ b/protoc_plugin/lib/protobuf_field.dart
@@ -88,7 +88,7 @@
       MessageGenerator d = baseType.generator;
       String keyType = d._fieldList[0].baseType.getDartType(fileGen);
       String valueType = d._fieldList[1].baseType.getDartType(fileGen);
-      return 'Map<$keyType, $valueType>';
+      return '$_coreImportPrefix.Map<$keyType, $valueType>';
     }
     if (isRepeated) return baseType.getRepeatedDartType(fileGen);
     return baseType.getDartType(fileGen);
@@ -167,14 +167,14 @@
     String prefix = '..a<$type>($number, $quotedName, $typeConstant';
     if (makeDefault == null) {
       switch (type) {
-        case 'String':
+        case '$_coreImportPrefix.String':
           if (typeConstant == '$_protobufImportPrefix.PbFieldType.OS') {
             return '..aOS($number, $quotedName)';
           } else if (typeConstant == '$_protobufImportPrefix.PbFieldType.QS') {
             return '..aQS($number, $quotedName)';
           }
           break;
-        case 'bool':
+        case '$_coreImportPrefix.bool':
           if (typeConstant == '$_protobufImportPrefix.PbFieldType.OB') {
             return '..aOB($number, $quotedName)';
           }
@@ -242,11 +242,11 @@
             '0' == descriptor.defaultValue) {
           return null;
         } else if (descriptor.defaultValue == 'inf') {
-          return 'double.infinity';
+          return '$_coreImportPrefix.double.infinity';
         } else if (descriptor.defaultValue == '-inf') {
-          return 'double.negativeInfinity';
+          return '$_coreImportPrefix.double.negativeInfinity';
         } else if (descriptor.defaultValue == 'nan') {
-          return 'double.nan';
+          return '$_coreImportPrefix.double.nan';
         } else if (HEX_LITERAL_REGEX.hasMatch(descriptor.defaultValue)) {
           return '(${descriptor.defaultValue}).toDouble()';
         } else if (INTEGER_LITERAL_REGEX.hasMatch(descriptor.defaultValue)) {
@@ -280,7 +280,7 @@
         String byteList = descriptor.defaultValue.codeUnits
             .map((b) => '0x${b.toRadixString(16)}')
             .join(',');
-        return '() => <int>[$byteList]';
+        return '() => <$_coreImportPrefix.int>[$byteList]';
       case FieldDescriptorProto_Type.TYPE_GROUP:
       case FieldDescriptorProto_Type.TYPE_MESSAGE:
         if (sameProtoFile) return '${baseType.unprefixed}.getDefault';
diff --git a/protoc_plugin/lib/service_generator.dart b/protoc_plugin/lib/service_generator.dart
index 427df93..0e3b582 100644
--- a/protoc_plugin/lib/service_generator.dart
+++ b/protoc_plugin/lib/service_generator.dart
@@ -150,14 +150,16 @@
   }
 
   void _generateRequestMethod(IndentingWriter out) {
-    out.addBlock('$_generatedMessage createRequest(String method) {', '}', () {
+    out.addBlock(
+        '$_generatedMessage createRequest($_coreImportPrefix.String method) {',
+        '}', () {
       out.addBlock("switch (method) {", "}", () {
         for (MethodDescriptorProto m in _methodDescriptors) {
           var inputClass = _getDartClassName(m.inputType);
           out.println("case '${m.name}': return new $inputClass();");
         }
         out.println("default: "
-            "throw new ArgumentError('Unknown method: \$method');");
+            "throw new $_coreImportPrefix.ArgumentError('Unknown method: \$method');");
       });
     });
     out.println();
@@ -166,7 +168,7 @@
   void _generateDispatchMethod(out) {
     out.addBlock(
         '$_future<$_generatedMessage> handleCall($_serverContext ctx, '
-        'String method, $_generatedMessage request) {',
+        '$_coreImportPrefix.String method, $_generatedMessage request) {',
         '}', () {
       out.addBlock("switch (method) {", "}", () {
         for (MethodDescriptorProto m in _methodDescriptors) {
@@ -175,7 +177,7 @@
               "case '${m.name}': return this.$methodName(ctx, request);");
         }
         out.println("default: "
-            "throw new ArgumentError('Unknown method: \$method');");
+            "throw new $_coreImportPrefix.ArgumentError('Unknown method: \$method');");
       });
     });
     out.println();
@@ -193,9 +195,11 @@
       _generateRequestMethod(out);
       _generateDispatchMethod(out);
       _generateMoreClassMembers(out);
-      out.println("Map<String, dynamic> get \$json => $jsonConstant;");
-      out.println("Map<String, Map<String, dynamic>> get \$messageJson =>"
-          " $messageJsonConstant;");
+      out.println(
+          "$_coreImportPrefix.Map<$_coreImportPrefix.String, $_coreImportPrefix.dynamic> get \$json => $jsonConstant;");
+      out.println(
+          "$_coreImportPrefix.Map<$_coreImportPrefix.String, $_coreImportPrefix.Map<$_coreImportPrefix.String,"
+          " $_coreImportPrefix.dynamic>> get \$messageJson => $messageJsonConstant;");
     });
     out.println();
   }
diff --git a/protoc_plugin/lib/src/dart_options.pb.dart b/protoc_plugin/lib/src/dart_options.pb.dart
index 388ed91..d37a264 100644
--- a/protoc_plugin/lib/src/dart_options.pb.dart
+++ b/protoc_plugin/lib/src/dart_options.pb.dart
@@ -2,10 +2,10 @@
 //  Generated code. Do not modify.
 //  source: dart_options.proto
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
+import 'dart:core' as $core show int, bool, double, String, List, Map, override;
 
 import 'package:protobuf/protobuf.dart' as $pb;
 
@@ -18,10 +18,10 @@
     ..hasRequiredFields = false;
 
   DartMixin() : super();
-  DartMixin.fromBuffer(List<int> i,
+  DartMixin.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  DartMixin.fromJson(String i,
+  DartMixin.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   DartMixin clone() => new DartMixin()..mergeFromMessage(this);
@@ -33,32 +33,29 @@
   static $pb.PbList<DartMixin> createRepeated() => new $pb.PbList<DartMixin>();
   static DartMixin getDefault() => _defaultInstance ??= create()..freeze();
   static DartMixin _defaultInstance;
-  static void $checkItem(DartMixin v) {
-    if (v is! DartMixin) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get name => $_getS(0, '');
-  set name(String v) {
+  $core.String get name => $_getS(0, '');
+  set name($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasName() => $_has(0);
+  $core.bool hasName() => $_has(0);
   void clearName() => clearField(1);
 
-  String get importFrom => $_getS(1, '');
-  set importFrom(String v) {
+  $core.String get importFrom => $_getS(1, '');
+  set importFrom($core.String v) {
     $_setString(1, v);
   }
 
-  bool hasImportFrom() => $_has(1);
+  $core.bool hasImportFrom() => $_has(1);
   void clearImportFrom() => clearField(2);
 
-  String get parent => $_getS(2, '');
-  set parent(String v) {
+  $core.String get parent => $_getS(2, '');
+  set parent($core.String v) {
     $_setString(2, v);
   }
 
-  bool hasParent() => $_has(2);
+  $core.bool hasParent() => $_has(2);
   void clearParent() => clearField(3);
 }
 
@@ -69,10 +66,10 @@
     ..hasRequiredFields = false;
 
   Imports() : super();
-  Imports.fromBuffer(List<int> i,
+  Imports.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  Imports.fromJson(String i,
+  Imports.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   Imports clone() => new Imports()..mergeFromMessage(this);
@@ -84,11 +81,8 @@
   static $pb.PbList<Imports> createRepeated() => new $pb.PbList<Imports>();
   static Imports getDefault() => _defaultInstance ??= create()..freeze();
   static Imports _defaultInstance;
-  static void $checkItem(Imports v) {
-    if (v is! Imports) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  List<DartMixin> get mixins => $_getList(0);
+  $core.List<DartMixin> get mixins => $_getList(0);
 }
 
 class Dart_options {
@@ -99,34 +93,32 @@
       $pb.PbFieldType.OM,
       Imports.getDefault,
       Imports.create);
-  static final $pb.Extension defaultMixin = new $pb.Extension<String>(
+  static final $pb.Extension defaultMixin = new $pb.Extension<$core.String>(
       'google.protobuf.FileOptions',
       'defaultMixin',
       96128839,
       $pb.PbFieldType.OS);
-  static final $pb.Extension mixin = new $pb.Extension<String>(
+  static final $pb.Extension mixin = new $pb.Extension<$core.String>(
       'google.protobuf.MessageOptions', 'mixin', 96128839, $pb.PbFieldType.OS);
-  static final $pb.Extension overrideGetter = new $pb.Extension<bool>(
+  static final $pb.Extension overrideGetter = new $pb.Extension<$core.bool>(
       'google.protobuf.FieldOptions',
       'overrideGetter',
       28205290,
       $pb.PbFieldType.OB);
-  static final $pb.Extension overrideSetter = new $pb.Extension<bool>(
+  static final $pb.Extension overrideSetter = new $pb.Extension<$core.bool>(
       'google.protobuf.FieldOptions',
       'overrideSetter',
       28937366,
       $pb.PbFieldType.OB);
-  static final $pb.Extension overrideHasMethod = new $pb.Extension<bool>(
+  static final $pb.Extension overrideHasMethod = new $pb.Extension<$core.bool>(
       'google.protobuf.FieldOptions',
       'overrideHasMethod',
       28937461,
       $pb.PbFieldType.OB);
-  static final $pb.Extension overrideClearMethod = new $pb.Extension<bool>(
-      'google.protobuf.FieldOptions',
-      'overrideClearMethod',
-      28907907,
-      $pb.PbFieldType.OB);
-  static final $pb.Extension dartName = new $pb.Extension<String>(
+  static final $pb.Extension overrideClearMethod =
+      new $pb.Extension<$core.bool>('google.protobuf.FieldOptions',
+          'overrideClearMethod', 28907907, $pb.PbFieldType.OB);
+  static final $pb.Extension dartName = new $pb.Extension<$core.String>(
       'google.protobuf.FieldOptions', 'dartName', 28700919, $pb.PbFieldType.OS);
   static void registerAllExtensions($pb.ExtensionRegistry registry) {
     registry.add(imports);
diff --git a/protoc_plugin/lib/src/descriptor.pb.dart b/protoc_plugin/lib/src/descriptor.pb.dart
index 94c29f1..f7f8f73 100644
--- a/protoc_plugin/lib/src/descriptor.pb.dart
+++ b/protoc_plugin/lib/src/descriptor.pb.dart
@@ -2,10 +2,10 @@
 //  Generated code. Do not modify.
 //  source: descriptor.proto
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
+import 'dart:core' as $core show int, bool, double, String, List, Map, override;
 
 import 'package:fixnum/fixnum.dart';
 import 'package:protobuf/protobuf.dart' as $pb;
@@ -21,10 +21,10 @@
         1, 'file', $pb.PbFieldType.PM, FileDescriptorProto.create);
 
   FileDescriptorSet() : super();
-  FileDescriptorSet.fromBuffer(List<int> i,
+  FileDescriptorSet.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  FileDescriptorSet.fromJson(String i,
+  FileDescriptorSet.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   FileDescriptorSet clone() => new FileDescriptorSet()..mergeFromMessage(this);
@@ -38,12 +38,8 @@
   static FileDescriptorSet getDefault() =>
       _defaultInstance ??= create()..freeze();
   static FileDescriptorSet _defaultInstance;
-  static void $checkItem(FileDescriptorSet v) {
-    if (v is! FileDescriptorSet)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  List<FileDescriptorProto> get file => $_getList(0);
+  $core.List<FileDescriptorProto> get file => $_getList(0);
 }
 
 class FileDescriptorProto extends $pb.GeneratedMessage {
@@ -64,15 +60,15 @@
         FileOptions.create)
     ..a<SourceCodeInfo>(9, 'sourceCodeInfo', $pb.PbFieldType.OM,
         SourceCodeInfo.getDefault, SourceCodeInfo.create)
-    ..p<int>(10, 'publicDependency', $pb.PbFieldType.P3)
-    ..p<int>(11, 'weakDependency', $pb.PbFieldType.P3)
+    ..p<$core.int>(10, 'publicDependency', $pb.PbFieldType.P3)
+    ..p<$core.int>(11, 'weakDependency', $pb.PbFieldType.P3)
     ..aOS(12, 'syntax');
 
   FileDescriptorProto() : super();
-  FileDescriptorProto.fromBuffer(List<int> i,
+  FileDescriptorProto.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  FileDescriptorProto.fromJson(String i,
+  FileDescriptorProto.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   FileDescriptorProto clone() =>
@@ -87,43 +83,39 @@
   static FileDescriptorProto getDefault() =>
       _defaultInstance ??= create()..freeze();
   static FileDescriptorProto _defaultInstance;
-  static void $checkItem(FileDescriptorProto v) {
-    if (v is! FileDescriptorProto)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get name => $_getS(0, '');
-  set name(String v) {
+  $core.String get name => $_getS(0, '');
+  set name($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasName() => $_has(0);
+  $core.bool hasName() => $_has(0);
   void clearName() => clearField(1);
 
-  String get package => $_getS(1, '');
-  set package(String v) {
+  $core.String get package => $_getS(1, '');
+  set package($core.String v) {
     $_setString(1, v);
   }
 
-  bool hasPackage() => $_has(1);
+  $core.bool hasPackage() => $_has(1);
   void clearPackage() => clearField(2);
 
-  List<String> get dependency => $_getList(2);
+  $core.List<$core.String> get dependency => $_getList(2);
 
-  List<DescriptorProto> get messageType => $_getList(3);
+  $core.List<DescriptorProto> get messageType => $_getList(3);
 
-  List<EnumDescriptorProto> get enumType => $_getList(4);
+  $core.List<EnumDescriptorProto> get enumType => $_getList(4);
 
-  List<ServiceDescriptorProto> get service => $_getList(5);
+  $core.List<ServiceDescriptorProto> get service => $_getList(5);
 
-  List<FieldDescriptorProto> get extension => $_getList(6);
+  $core.List<FieldDescriptorProto> get extension => $_getList(6);
 
   FileOptions get options => $_getN(7);
   set options(FileOptions v) {
     setField(8, v);
   }
 
-  bool hasOptions() => $_has(7);
+  $core.bool hasOptions() => $_has(7);
   void clearOptions() => clearField(8);
 
   SourceCodeInfo get sourceCodeInfo => $_getN(8);
@@ -131,19 +123,19 @@
     setField(9, v);
   }
 
-  bool hasSourceCodeInfo() => $_has(8);
+  $core.bool hasSourceCodeInfo() => $_has(8);
   void clearSourceCodeInfo() => clearField(9);
 
-  List<int> get publicDependency => $_getList(9);
+  $core.List<$core.int> get publicDependency => $_getList(9);
 
-  List<int> get weakDependency => $_getList(10);
+  $core.List<$core.int> get weakDependency => $_getList(10);
 
-  String get syntax => $_getS(11, '');
-  set syntax(String v) {
+  $core.String get syntax => $_getS(11, '');
+  set syntax($core.String v) {
     $_setString(11, v);
   }
 
-  bool hasSyntax() => $_has(11);
+  $core.bool hasSyntax() => $_has(11);
   void clearSyntax() => clearField(12);
 }
 
@@ -151,15 +143,15 @@
   static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
       'DescriptorProto.ExtensionRange',
       package: const $pb.PackageName('google.protobuf'))
-    ..a<int>(1, 'start', $pb.PbFieldType.O3)
-    ..a<int>(2, 'end', $pb.PbFieldType.O3)
+    ..a<$core.int>(1, 'start', $pb.PbFieldType.O3)
+    ..a<$core.int>(2, 'end', $pb.PbFieldType.O3)
     ..hasRequiredFields = false;
 
   DescriptorProto_ExtensionRange() : super();
-  DescriptorProto_ExtensionRange.fromBuffer(List<int> i,
+  DescriptorProto_ExtensionRange.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  DescriptorProto_ExtensionRange.fromJson(String i,
+  DescriptorProto_ExtensionRange.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   DescriptorProto_ExtensionRange clone() =>
@@ -177,25 +169,21 @@
   static DescriptorProto_ExtensionRange getDefault() =>
       _defaultInstance ??= create()..freeze();
   static DescriptorProto_ExtensionRange _defaultInstance;
-  static void $checkItem(DescriptorProto_ExtensionRange v) {
-    if (v is! DescriptorProto_ExtensionRange)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  int get start => $_get(0, 0);
-  set start(int v) {
+  $core.int get start => $_get(0, 0);
+  set start($core.int v) {
     $_setSignedInt32(0, v);
   }
 
-  bool hasStart() => $_has(0);
+  $core.bool hasStart() => $_has(0);
   void clearStart() => clearField(1);
 
-  int get end => $_get(1, 0);
-  set end(int v) {
+  $core.int get end => $_get(1, 0);
+  set end($core.int v) {
     $_setSignedInt32(1, v);
   }
 
-  bool hasEnd() => $_has(1);
+  $core.bool hasEnd() => $_has(1);
   void clearEnd() => clearField(2);
 }
 
@@ -203,15 +191,15 @@
   static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
       'DescriptorProto.ReservedRange',
       package: const $pb.PackageName('google.protobuf'))
-    ..a<int>(1, 'start', $pb.PbFieldType.O3)
-    ..a<int>(2, 'end', $pb.PbFieldType.O3)
+    ..a<$core.int>(1, 'start', $pb.PbFieldType.O3)
+    ..a<$core.int>(2, 'end', $pb.PbFieldType.O3)
     ..hasRequiredFields = false;
 
   DescriptorProto_ReservedRange() : super();
-  DescriptorProto_ReservedRange.fromBuffer(List<int> i,
+  DescriptorProto_ReservedRange.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  DescriptorProto_ReservedRange.fromJson(String i,
+  DescriptorProto_ReservedRange.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   DescriptorProto_ReservedRange clone() =>
@@ -229,25 +217,21 @@
   static DescriptorProto_ReservedRange getDefault() =>
       _defaultInstance ??= create()..freeze();
   static DescriptorProto_ReservedRange _defaultInstance;
-  static void $checkItem(DescriptorProto_ReservedRange v) {
-    if (v is! DescriptorProto_ReservedRange)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  int get start => $_get(0, 0);
-  set start(int v) {
+  $core.int get start => $_get(0, 0);
+  set start($core.int v) {
     $_setSignedInt32(0, v);
   }
 
-  bool hasStart() => $_has(0);
+  $core.bool hasStart() => $_has(0);
   void clearStart() => clearField(1);
 
-  int get end => $_get(1, 0);
-  set end(int v) {
+  $core.int get end => $_get(1, 0);
+  set end($core.int v) {
     $_setSignedInt32(1, v);
   }
 
-  bool hasEnd() => $_has(1);
+  $core.bool hasEnd() => $_has(1);
   void clearEnd() => clearField(2);
 }
 
@@ -274,10 +258,10 @@
     ..pPS(10, 'reservedName');
 
   DescriptorProto() : super();
-  DescriptorProto.fromBuffer(List<int> i,
+  DescriptorProto.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  DescriptorProto.fromJson(String i,
+  DescriptorProto.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   DescriptorProto clone() => new DescriptorProto()..mergeFromMessage(this);
@@ -291,41 +275,38 @@
   static DescriptorProto getDefault() =>
       _defaultInstance ??= create()..freeze();
   static DescriptorProto _defaultInstance;
-  static void $checkItem(DescriptorProto v) {
-    if (v is! DescriptorProto) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get name => $_getS(0, '');
-  set name(String v) {
+  $core.String get name => $_getS(0, '');
+  set name($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasName() => $_has(0);
+  $core.bool hasName() => $_has(0);
   void clearName() => clearField(1);
 
-  List<FieldDescriptorProto> get field => $_getList(1);
+  $core.List<FieldDescriptorProto> get field => $_getList(1);
 
-  List<DescriptorProto> get nestedType => $_getList(2);
+  $core.List<DescriptorProto> get nestedType => $_getList(2);
 
-  List<EnumDescriptorProto> get enumType => $_getList(3);
+  $core.List<EnumDescriptorProto> get enumType => $_getList(3);
 
-  List<DescriptorProto_ExtensionRange> get extensionRange => $_getList(4);
+  $core.List<DescriptorProto_ExtensionRange> get extensionRange => $_getList(4);
 
-  List<FieldDescriptorProto> get extension => $_getList(5);
+  $core.List<FieldDescriptorProto> get extension => $_getList(5);
 
   MessageOptions get options => $_getN(6);
   set options(MessageOptions v) {
     setField(7, v);
   }
 
-  bool hasOptions() => $_has(6);
+  $core.bool hasOptions() => $_has(6);
   void clearOptions() => clearField(7);
 
-  List<OneofDescriptorProto> get oneofDecl => $_getList(7);
+  $core.List<OneofDescriptorProto> get oneofDecl => $_getList(7);
 
-  List<DescriptorProto_ReservedRange> get reservedRange => $_getList(8);
+  $core.List<DescriptorProto_ReservedRange> get reservedRange => $_getList(8);
 
-  List<String> get reservedName => $_getList(9);
+  $core.List<$core.String> get reservedName => $_getList(9);
 }
 
 class FieldDescriptorProto extends $pb.GeneratedMessage {
@@ -333,7 +314,7 @@
       package: const $pb.PackageName('google.protobuf'))
     ..aOS(1, 'name')
     ..aOS(2, 'extendee')
-    ..a<int>(3, 'number', $pb.PbFieldType.O3)
+    ..a<$core.int>(3, 'number', $pb.PbFieldType.O3)
     ..e<FieldDescriptorProto_Label>(
         4,
         'label',
@@ -352,14 +333,14 @@
     ..aOS(7, 'defaultValue')
     ..a<FieldOptions>(8, 'options', $pb.PbFieldType.OM, FieldOptions.getDefault,
         FieldOptions.create)
-    ..a<int>(9, 'oneofIndex', $pb.PbFieldType.O3)
+    ..a<$core.int>(9, 'oneofIndex', $pb.PbFieldType.O3)
     ..aOS(10, 'jsonName');
 
   FieldDescriptorProto() : super();
-  FieldDescriptorProto.fromBuffer(List<int> i,
+  FieldDescriptorProto.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  FieldDescriptorProto.fromJson(String i,
+  FieldDescriptorProto.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   FieldDescriptorProto clone() =>
@@ -374,33 +355,29 @@
   static FieldDescriptorProto getDefault() =>
       _defaultInstance ??= create()..freeze();
   static FieldDescriptorProto _defaultInstance;
-  static void $checkItem(FieldDescriptorProto v) {
-    if (v is! FieldDescriptorProto)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get name => $_getS(0, '');
-  set name(String v) {
+  $core.String get name => $_getS(0, '');
+  set name($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasName() => $_has(0);
+  $core.bool hasName() => $_has(0);
   void clearName() => clearField(1);
 
-  String get extendee => $_getS(1, '');
-  set extendee(String v) {
+  $core.String get extendee => $_getS(1, '');
+  set extendee($core.String v) {
     $_setString(1, v);
   }
 
-  bool hasExtendee() => $_has(1);
+  $core.bool hasExtendee() => $_has(1);
   void clearExtendee() => clearField(2);
 
-  int get number => $_get(2, 0);
-  set number(int v) {
+  $core.int get number => $_get(2, 0);
+  set number($core.int v) {
     $_setSignedInt32(2, v);
   }
 
-  bool hasNumber() => $_has(2);
+  $core.bool hasNumber() => $_has(2);
   void clearNumber() => clearField(3);
 
   FieldDescriptorProto_Label get label => $_getN(3);
@@ -408,7 +385,7 @@
     setField(4, v);
   }
 
-  bool hasLabel() => $_has(3);
+  $core.bool hasLabel() => $_has(3);
   void clearLabel() => clearField(4);
 
   FieldDescriptorProto_Type get type => $_getN(4);
@@ -416,23 +393,23 @@
     setField(5, v);
   }
 
-  bool hasType() => $_has(4);
+  $core.bool hasType() => $_has(4);
   void clearType() => clearField(5);
 
-  String get typeName => $_getS(5, '');
-  set typeName(String v) {
+  $core.String get typeName => $_getS(5, '');
+  set typeName($core.String v) {
     $_setString(5, v);
   }
 
-  bool hasTypeName() => $_has(5);
+  $core.bool hasTypeName() => $_has(5);
   void clearTypeName() => clearField(6);
 
-  String get defaultValue => $_getS(6, '');
-  set defaultValue(String v) {
+  $core.String get defaultValue => $_getS(6, '');
+  set defaultValue($core.String v) {
     $_setString(6, v);
   }
 
-  bool hasDefaultValue() => $_has(6);
+  $core.bool hasDefaultValue() => $_has(6);
   void clearDefaultValue() => clearField(7);
 
   FieldOptions get options => $_getN(7);
@@ -440,23 +417,23 @@
     setField(8, v);
   }
 
-  bool hasOptions() => $_has(7);
+  $core.bool hasOptions() => $_has(7);
   void clearOptions() => clearField(8);
 
-  int get oneofIndex => $_get(8, 0);
-  set oneofIndex(int v) {
+  $core.int get oneofIndex => $_get(8, 0);
+  set oneofIndex($core.int v) {
     $_setSignedInt32(8, v);
   }
 
-  bool hasOneofIndex() => $_has(8);
+  $core.bool hasOneofIndex() => $_has(8);
   void clearOneofIndex() => clearField(9);
 
-  String get jsonName => $_getS(9, '');
-  set jsonName(String v) {
+  $core.String get jsonName => $_getS(9, '');
+  set jsonName($core.String v) {
     $_setString(9, v);
   }
 
-  bool hasJsonName() => $_has(9);
+  $core.bool hasJsonName() => $_has(9);
   void clearJsonName() => clearField(10);
 }
 
@@ -468,10 +445,10 @@
         OneofOptions.create);
 
   OneofDescriptorProto() : super();
-  OneofDescriptorProto.fromBuffer(List<int> i,
+  OneofDescriptorProto.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  OneofDescriptorProto.fromJson(String i,
+  OneofDescriptorProto.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   OneofDescriptorProto clone() =>
@@ -486,17 +463,13 @@
   static OneofDescriptorProto getDefault() =>
       _defaultInstance ??= create()..freeze();
   static OneofDescriptorProto _defaultInstance;
-  static void $checkItem(OneofDescriptorProto v) {
-    if (v is! OneofDescriptorProto)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get name => $_getS(0, '');
-  set name(String v) {
+  $core.String get name => $_getS(0, '');
+  set name($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasName() => $_has(0);
+  $core.bool hasName() => $_has(0);
   void clearName() => clearField(1);
 
   OneofOptions get options => $_getN(1);
@@ -504,7 +477,7 @@
     setField(2, v);
   }
 
-  bool hasOptions() => $_has(1);
+  $core.bool hasOptions() => $_has(1);
   void clearOptions() => clearField(2);
 }
 
@@ -518,10 +491,10 @@
         EnumOptions.create);
 
   EnumDescriptorProto() : super();
-  EnumDescriptorProto.fromBuffer(List<int> i,
+  EnumDescriptorProto.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  EnumDescriptorProto.fromJson(String i,
+  EnumDescriptorProto.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   EnumDescriptorProto clone() =>
@@ -536,27 +509,23 @@
   static EnumDescriptorProto getDefault() =>
       _defaultInstance ??= create()..freeze();
   static EnumDescriptorProto _defaultInstance;
-  static void $checkItem(EnumDescriptorProto v) {
-    if (v is! EnumDescriptorProto)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get name => $_getS(0, '');
-  set name(String v) {
+  $core.String get name => $_getS(0, '');
+  set name($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasName() => $_has(0);
+  $core.bool hasName() => $_has(0);
   void clearName() => clearField(1);
 
-  List<EnumValueDescriptorProto> get value => $_getList(1);
+  $core.List<EnumValueDescriptorProto> get value => $_getList(1);
 
   EnumOptions get options => $_getN(2);
   set options(EnumOptions v) {
     setField(3, v);
   }
 
-  bool hasOptions() => $_has(2);
+  $core.bool hasOptions() => $_has(2);
   void clearOptions() => clearField(3);
 }
 
@@ -565,15 +534,15 @@
       'EnumValueDescriptorProto',
       package: const $pb.PackageName('google.protobuf'))
     ..aOS(1, 'name')
-    ..a<int>(2, 'number', $pb.PbFieldType.O3)
+    ..a<$core.int>(2, 'number', $pb.PbFieldType.O3)
     ..a<EnumValueOptions>(3, 'options', $pb.PbFieldType.OM,
         EnumValueOptions.getDefault, EnumValueOptions.create);
 
   EnumValueDescriptorProto() : super();
-  EnumValueDescriptorProto.fromBuffer(List<int> i,
+  EnumValueDescriptorProto.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  EnumValueDescriptorProto.fromJson(String i,
+  EnumValueDescriptorProto.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   EnumValueDescriptorProto clone() =>
@@ -589,25 +558,21 @@
   static EnumValueDescriptorProto getDefault() =>
       _defaultInstance ??= create()..freeze();
   static EnumValueDescriptorProto _defaultInstance;
-  static void $checkItem(EnumValueDescriptorProto v) {
-    if (v is! EnumValueDescriptorProto)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get name => $_getS(0, '');
-  set name(String v) {
+  $core.String get name => $_getS(0, '');
+  set name($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasName() => $_has(0);
+  $core.bool hasName() => $_has(0);
   void clearName() => clearField(1);
 
-  int get number => $_get(1, 0);
-  set number(int v) {
+  $core.int get number => $_get(1, 0);
+  set number($core.int v) {
     $_setSignedInt32(1, v);
   }
 
-  bool hasNumber() => $_has(1);
+  $core.bool hasNumber() => $_has(1);
   void clearNumber() => clearField(2);
 
   EnumValueOptions get options => $_getN(2);
@@ -615,7 +580,7 @@
     setField(3, v);
   }
 
-  bool hasOptions() => $_has(2);
+  $core.bool hasOptions() => $_has(2);
   void clearOptions() => clearField(3);
 }
 
@@ -630,10 +595,10 @@
         ServiceOptions.getDefault, ServiceOptions.create);
 
   ServiceDescriptorProto() : super();
-  ServiceDescriptorProto.fromBuffer(List<int> i,
+  ServiceDescriptorProto.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  ServiceDescriptorProto.fromJson(String i,
+  ServiceDescriptorProto.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   ServiceDescriptorProto clone() =>
@@ -649,27 +614,23 @@
   static ServiceDescriptorProto getDefault() =>
       _defaultInstance ??= create()..freeze();
   static ServiceDescriptorProto _defaultInstance;
-  static void $checkItem(ServiceDescriptorProto v) {
-    if (v is! ServiceDescriptorProto)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get name => $_getS(0, '');
-  set name(String v) {
+  $core.String get name => $_getS(0, '');
+  set name($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasName() => $_has(0);
+  $core.bool hasName() => $_has(0);
   void clearName() => clearField(1);
 
-  List<MethodDescriptorProto> get method => $_getList(1);
+  $core.List<MethodDescriptorProto> get method => $_getList(1);
 
   ServiceOptions get options => $_getN(2);
   set options(ServiceOptions v) {
     setField(3, v);
   }
 
-  bool hasOptions() => $_has(2);
+  $core.bool hasOptions() => $_has(2);
   void clearOptions() => clearField(3);
 }
 
@@ -685,10 +646,10 @@
     ..aOB(6, 'serverStreaming');
 
   MethodDescriptorProto() : super();
-  MethodDescriptorProto.fromBuffer(List<int> i,
+  MethodDescriptorProto.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  MethodDescriptorProto.fromJson(String i,
+  MethodDescriptorProto.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   MethodDescriptorProto clone() =>
@@ -704,33 +665,29 @@
   static MethodDescriptorProto getDefault() =>
       _defaultInstance ??= create()..freeze();
   static MethodDescriptorProto _defaultInstance;
-  static void $checkItem(MethodDescriptorProto v) {
-    if (v is! MethodDescriptorProto)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get name => $_getS(0, '');
-  set name(String v) {
+  $core.String get name => $_getS(0, '');
+  set name($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasName() => $_has(0);
+  $core.bool hasName() => $_has(0);
   void clearName() => clearField(1);
 
-  String get inputType => $_getS(1, '');
-  set inputType(String v) {
+  $core.String get inputType => $_getS(1, '');
+  set inputType($core.String v) {
     $_setString(1, v);
   }
 
-  bool hasInputType() => $_has(1);
+  $core.bool hasInputType() => $_has(1);
   void clearInputType() => clearField(2);
 
-  String get outputType => $_getS(2, '');
-  set outputType(String v) {
+  $core.String get outputType => $_getS(2, '');
+  set outputType($core.String v) {
     $_setString(2, v);
   }
 
-  bool hasOutputType() => $_has(2);
+  $core.bool hasOutputType() => $_has(2);
   void clearOutputType() => clearField(3);
 
   MethodOptions get options => $_getN(3);
@@ -738,23 +695,23 @@
     setField(4, v);
   }
 
-  bool hasOptions() => $_has(3);
+  $core.bool hasOptions() => $_has(3);
   void clearOptions() => clearField(4);
 
-  bool get clientStreaming => $_get(4, false);
-  set clientStreaming(bool v) {
+  $core.bool get clientStreaming => $_get(4, false);
+  set clientStreaming($core.bool v) {
     $_setBool(4, v);
   }
 
-  bool hasClientStreaming() => $_has(4);
+  $core.bool hasClientStreaming() => $_has(4);
   void clearClientStreaming() => clearField(5);
 
-  bool get serverStreaming => $_get(5, false);
-  set serverStreaming(bool v) {
+  $core.bool get serverStreaming => $_get(5, false);
+  set serverStreaming($core.bool v) {
     $_setBool(5, v);
   }
 
-  bool hasServerStreaming() => $_has(5);
+  $core.bool hasServerStreaming() => $_has(5);
   void clearServerStreaming() => clearField(6);
 }
 
@@ -789,10 +746,10 @@
     ..hasExtensions = true;
 
   FileOptions() : super();
-  FileOptions.fromBuffer(List<int> i,
+  FileOptions.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  FileOptions.fromJson(String i,
+  FileOptions.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   FileOptions clone() => new FileOptions()..mergeFromMessage(this);
@@ -805,24 +762,21 @@
       new $pb.PbList<FileOptions>();
   static FileOptions getDefault() => _defaultInstance ??= create()..freeze();
   static FileOptions _defaultInstance;
-  static void $checkItem(FileOptions v) {
-    if (v is! FileOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get javaPackage => $_getS(0, '');
-  set javaPackage(String v) {
+  $core.String get javaPackage => $_getS(0, '');
+  set javaPackage($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasJavaPackage() => $_has(0);
+  $core.bool hasJavaPackage() => $_has(0);
   void clearJavaPackage() => clearField(1);
 
-  String get javaOuterClassname => $_getS(1, '');
-  set javaOuterClassname(String v) {
+  $core.String get javaOuterClassname => $_getS(1, '');
+  set javaOuterClassname($core.String v) {
     $_setString(1, v);
   }
 
-  bool hasJavaOuterClassname() => $_has(1);
+  $core.bool hasJavaOuterClassname() => $_has(1);
   void clearJavaOuterClassname() => clearField(8);
 
   FileOptions_OptimizeMode get optimizeFor => $_getN(2);
@@ -830,122 +784,122 @@
     setField(9, v);
   }
 
-  bool hasOptimizeFor() => $_has(2);
+  $core.bool hasOptimizeFor() => $_has(2);
   void clearOptimizeFor() => clearField(9);
 
-  bool get javaMultipleFiles => $_get(3, false);
-  set javaMultipleFiles(bool v) {
+  $core.bool get javaMultipleFiles => $_get(3, false);
+  set javaMultipleFiles($core.bool v) {
     $_setBool(3, v);
   }
 
-  bool hasJavaMultipleFiles() => $_has(3);
+  $core.bool hasJavaMultipleFiles() => $_has(3);
   void clearJavaMultipleFiles() => clearField(10);
 
-  String get goPackage => $_getS(4, '');
-  set goPackage(String v) {
+  $core.String get goPackage => $_getS(4, '');
+  set goPackage($core.String v) {
     $_setString(4, v);
   }
 
-  bool hasGoPackage() => $_has(4);
+  $core.bool hasGoPackage() => $_has(4);
   void clearGoPackage() => clearField(11);
 
-  bool get ccGenericServices => $_get(5, false);
-  set ccGenericServices(bool v) {
+  $core.bool get ccGenericServices => $_get(5, false);
+  set ccGenericServices($core.bool v) {
     $_setBool(5, v);
   }
 
-  bool hasCcGenericServices() => $_has(5);
+  $core.bool hasCcGenericServices() => $_has(5);
   void clearCcGenericServices() => clearField(16);
 
-  bool get javaGenericServices => $_get(6, false);
-  set javaGenericServices(bool v) {
+  $core.bool get javaGenericServices => $_get(6, false);
+  set javaGenericServices($core.bool v) {
     $_setBool(6, v);
   }
 
-  bool hasJavaGenericServices() => $_has(6);
+  $core.bool hasJavaGenericServices() => $_has(6);
   void clearJavaGenericServices() => clearField(17);
 
-  bool get pyGenericServices => $_get(7, false);
-  set pyGenericServices(bool v) {
+  $core.bool get pyGenericServices => $_get(7, false);
+  set pyGenericServices($core.bool v) {
     $_setBool(7, v);
   }
 
-  bool hasPyGenericServices() => $_has(7);
+  $core.bool hasPyGenericServices() => $_has(7);
   void clearPyGenericServices() => clearField(18);
 
-  bool get javaGenerateEqualsAndHash => $_get(8, false);
-  set javaGenerateEqualsAndHash(bool v) {
+  $core.bool get javaGenerateEqualsAndHash => $_get(8, false);
+  set javaGenerateEqualsAndHash($core.bool v) {
     $_setBool(8, v);
   }
 
-  bool hasJavaGenerateEqualsAndHash() => $_has(8);
+  $core.bool hasJavaGenerateEqualsAndHash() => $_has(8);
   void clearJavaGenerateEqualsAndHash() => clearField(20);
 
-  bool get deprecated => $_get(9, false);
-  set deprecated(bool v) {
+  $core.bool get deprecated => $_get(9, false);
+  set deprecated($core.bool v) {
     $_setBool(9, v);
   }
 
-  bool hasDeprecated() => $_has(9);
+  $core.bool hasDeprecated() => $_has(9);
   void clearDeprecated() => clearField(23);
 
-  bool get javaStringCheckUtf8 => $_get(10, false);
-  set javaStringCheckUtf8(bool v) {
+  $core.bool get javaStringCheckUtf8 => $_get(10, false);
+  set javaStringCheckUtf8($core.bool v) {
     $_setBool(10, v);
   }
 
-  bool hasJavaStringCheckUtf8() => $_has(10);
+  $core.bool hasJavaStringCheckUtf8() => $_has(10);
   void clearJavaStringCheckUtf8() => clearField(27);
 
-  bool get ccEnableArenas => $_get(11, false);
-  set ccEnableArenas(bool v) {
+  $core.bool get ccEnableArenas => $_get(11, false);
+  set ccEnableArenas($core.bool v) {
     $_setBool(11, v);
   }
 
-  bool hasCcEnableArenas() => $_has(11);
+  $core.bool hasCcEnableArenas() => $_has(11);
   void clearCcEnableArenas() => clearField(31);
 
-  String get objcClassPrefix => $_getS(12, '');
-  set objcClassPrefix(String v) {
+  $core.String get objcClassPrefix => $_getS(12, '');
+  set objcClassPrefix($core.String v) {
     $_setString(12, v);
   }
 
-  bool hasObjcClassPrefix() => $_has(12);
+  $core.bool hasObjcClassPrefix() => $_has(12);
   void clearObjcClassPrefix() => clearField(36);
 
-  String get csharpNamespace => $_getS(13, '');
-  set csharpNamespace(String v) {
+  $core.String get csharpNamespace => $_getS(13, '');
+  set csharpNamespace($core.String v) {
     $_setString(13, v);
   }
 
-  bool hasCsharpNamespace() => $_has(13);
+  $core.bool hasCsharpNamespace() => $_has(13);
   void clearCsharpNamespace() => clearField(37);
 
-  String get swiftPrefix => $_getS(14, '');
-  set swiftPrefix(String v) {
+  $core.String get swiftPrefix => $_getS(14, '');
+  set swiftPrefix($core.String v) {
     $_setString(14, v);
   }
 
-  bool hasSwiftPrefix() => $_has(14);
+  $core.bool hasSwiftPrefix() => $_has(14);
   void clearSwiftPrefix() => clearField(39);
 
-  String get phpClassPrefix => $_getS(15, '');
-  set phpClassPrefix(String v) {
+  $core.String get phpClassPrefix => $_getS(15, '');
+  set phpClassPrefix($core.String v) {
     $_setString(15, v);
   }
 
-  bool hasPhpClassPrefix() => $_has(15);
+  $core.bool hasPhpClassPrefix() => $_has(15);
   void clearPhpClassPrefix() => clearField(40);
 
-  String get phpNamespace => $_getS(16, '');
-  set phpNamespace(String v) {
+  $core.String get phpNamespace => $_getS(16, '');
+  set phpNamespace($core.String v) {
     $_setString(16, v);
   }
 
-  bool hasPhpNamespace() => $_has(16);
+  $core.bool hasPhpNamespace() => $_has(16);
   void clearPhpNamespace() => clearField(41);
 
-  List<UninterpretedOption> get uninterpretedOption => $_getList(17);
+  $core.List<UninterpretedOption> get uninterpretedOption => $_getList(17);
 }
 
 class MessageOptions extends $pb.GeneratedMessage {
@@ -960,10 +914,10 @@
     ..hasExtensions = true;
 
   MessageOptions() : super();
-  MessageOptions.fromBuffer(List<int> i,
+  MessageOptions.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  MessageOptions.fromJson(String i,
+  MessageOptions.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   MessageOptions clone() => new MessageOptions()..mergeFromMessage(this);
@@ -976,43 +930,40 @@
       new $pb.PbList<MessageOptions>();
   static MessageOptions getDefault() => _defaultInstance ??= create()..freeze();
   static MessageOptions _defaultInstance;
-  static void $checkItem(MessageOptions v) {
-    if (v is! MessageOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  bool get messageSetWireFormat => $_get(0, false);
-  set messageSetWireFormat(bool v) {
+  $core.bool get messageSetWireFormat => $_get(0, false);
+  set messageSetWireFormat($core.bool v) {
     $_setBool(0, v);
   }
 
-  bool hasMessageSetWireFormat() => $_has(0);
+  $core.bool hasMessageSetWireFormat() => $_has(0);
   void clearMessageSetWireFormat() => clearField(1);
 
-  bool get noStandardDescriptorAccessor => $_get(1, false);
-  set noStandardDescriptorAccessor(bool v) {
+  $core.bool get noStandardDescriptorAccessor => $_get(1, false);
+  set noStandardDescriptorAccessor($core.bool v) {
     $_setBool(1, v);
   }
 
-  bool hasNoStandardDescriptorAccessor() => $_has(1);
+  $core.bool hasNoStandardDescriptorAccessor() => $_has(1);
   void clearNoStandardDescriptorAccessor() => clearField(2);
 
-  bool get deprecated => $_get(2, false);
-  set deprecated(bool v) {
+  $core.bool get deprecated => $_get(2, false);
+  set deprecated($core.bool v) {
     $_setBool(2, v);
   }
 
-  bool hasDeprecated() => $_has(2);
+  $core.bool hasDeprecated() => $_has(2);
   void clearDeprecated() => clearField(3);
 
-  bool get mapEntry => $_get(3, false);
-  set mapEntry(bool v) {
+  $core.bool get mapEntry => $_get(3, false);
+  set mapEntry($core.bool v) {
     $_setBool(3, v);
   }
 
-  bool hasMapEntry() => $_has(3);
+  $core.bool hasMapEntry() => $_has(3);
   void clearMapEntry() => clearField(7);
 
-  List<UninterpretedOption> get uninterpretedOption => $_getList(4);
+  $core.List<UninterpretedOption> get uninterpretedOption => $_getList(4);
 }
 
 class FieldOptions extends $pb.GeneratedMessage {
@@ -1041,10 +992,10 @@
     ..hasExtensions = true;
 
   FieldOptions() : super();
-  FieldOptions.fromBuffer(List<int> i,
+  FieldOptions.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  FieldOptions.fromJson(String i,
+  FieldOptions.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   FieldOptions clone() => new FieldOptions()..mergeFromMessage(this);
@@ -1057,40 +1008,37 @@
       new $pb.PbList<FieldOptions>();
   static FieldOptions getDefault() => _defaultInstance ??= create()..freeze();
   static FieldOptions _defaultInstance;
-  static void $checkItem(FieldOptions v) {
-    if (v is! FieldOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
   FieldOptions_CType get ctype => $_getN(0);
   set ctype(FieldOptions_CType v) {
     setField(1, v);
   }
 
-  bool hasCtype() => $_has(0);
+  $core.bool hasCtype() => $_has(0);
   void clearCtype() => clearField(1);
 
-  bool get packed => $_get(1, false);
-  set packed(bool v) {
+  $core.bool get packed => $_get(1, false);
+  set packed($core.bool v) {
     $_setBool(1, v);
   }
 
-  bool hasPacked() => $_has(1);
+  $core.bool hasPacked() => $_has(1);
   void clearPacked() => clearField(2);
 
-  bool get deprecated => $_get(2, false);
-  set deprecated(bool v) {
+  $core.bool get deprecated => $_get(2, false);
+  set deprecated($core.bool v) {
     $_setBool(2, v);
   }
 
-  bool hasDeprecated() => $_has(2);
+  $core.bool hasDeprecated() => $_has(2);
   void clearDeprecated() => clearField(3);
 
-  bool get lazy => $_get(3, false);
-  set lazy(bool v) {
+  $core.bool get lazy => $_get(3, false);
+  set lazy($core.bool v) {
     $_setBool(3, v);
   }
 
-  bool hasLazy() => $_has(3);
+  $core.bool hasLazy() => $_has(3);
   void clearLazy() => clearField(5);
 
   FieldOptions_JSType get jstype => $_getN(4);
@@ -1098,18 +1046,18 @@
     setField(6, v);
   }
 
-  bool hasJstype() => $_has(4);
+  $core.bool hasJstype() => $_has(4);
   void clearJstype() => clearField(6);
 
-  bool get weak => $_get(5, false);
-  set weak(bool v) {
+  $core.bool get weak => $_get(5, false);
+  set weak($core.bool v) {
     $_setBool(5, v);
   }
 
-  bool hasWeak() => $_has(5);
+  $core.bool hasWeak() => $_has(5);
   void clearWeak() => clearField(10);
 
-  List<UninterpretedOption> get uninterpretedOption => $_getList(6);
+  $core.List<UninterpretedOption> get uninterpretedOption => $_getList(6);
 }
 
 class OneofOptions extends $pb.GeneratedMessage {
@@ -1120,10 +1068,10 @@
     ..hasExtensions = true;
 
   OneofOptions() : super();
-  OneofOptions.fromBuffer(List<int> i,
+  OneofOptions.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  OneofOptions.fromJson(String i,
+  OneofOptions.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   OneofOptions clone() => new OneofOptions()..mergeFromMessage(this);
@@ -1136,11 +1084,8 @@
       new $pb.PbList<OneofOptions>();
   static OneofOptions getDefault() => _defaultInstance ??= create()..freeze();
   static OneofOptions _defaultInstance;
-  static void $checkItem(OneofOptions v) {
-    if (v is! OneofOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  List<UninterpretedOption> get uninterpretedOption => $_getList(0);
+  $core.List<UninterpretedOption> get uninterpretedOption => $_getList(0);
 }
 
 class EnumOptions extends $pb.GeneratedMessage {
@@ -1153,10 +1098,10 @@
     ..hasExtensions = true;
 
   EnumOptions() : super();
-  EnumOptions.fromBuffer(List<int> i,
+  EnumOptions.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  EnumOptions.fromJson(String i,
+  EnumOptions.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   EnumOptions clone() => new EnumOptions()..mergeFromMessage(this);
@@ -1169,27 +1114,24 @@
       new $pb.PbList<EnumOptions>();
   static EnumOptions getDefault() => _defaultInstance ??= create()..freeze();
   static EnumOptions _defaultInstance;
-  static void $checkItem(EnumOptions v) {
-    if (v is! EnumOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  bool get allowAlias => $_get(0, false);
-  set allowAlias(bool v) {
+  $core.bool get allowAlias => $_get(0, false);
+  set allowAlias($core.bool v) {
     $_setBool(0, v);
   }
 
-  bool hasAllowAlias() => $_has(0);
+  $core.bool hasAllowAlias() => $_has(0);
   void clearAllowAlias() => clearField(2);
 
-  bool get deprecated => $_get(1, false);
-  set deprecated(bool v) {
+  $core.bool get deprecated => $_get(1, false);
+  set deprecated($core.bool v) {
     $_setBool(1, v);
   }
 
-  bool hasDeprecated() => $_has(1);
+  $core.bool hasDeprecated() => $_has(1);
   void clearDeprecated() => clearField(3);
 
-  List<UninterpretedOption> get uninterpretedOption => $_getList(2);
+  $core.List<UninterpretedOption> get uninterpretedOption => $_getList(2);
 }
 
 class EnumValueOptions extends $pb.GeneratedMessage {
@@ -1201,10 +1143,10 @@
     ..hasExtensions = true;
 
   EnumValueOptions() : super();
-  EnumValueOptions.fromBuffer(List<int> i,
+  EnumValueOptions.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  EnumValueOptions.fromJson(String i,
+  EnumValueOptions.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   EnumValueOptions clone() => new EnumValueOptions()..mergeFromMessage(this);
@@ -1218,19 +1160,16 @@
   static EnumValueOptions getDefault() =>
       _defaultInstance ??= create()..freeze();
   static EnumValueOptions _defaultInstance;
-  static void $checkItem(EnumValueOptions v) {
-    if (v is! EnumValueOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  bool get deprecated => $_get(0, false);
-  set deprecated(bool v) {
+  $core.bool get deprecated => $_get(0, false);
+  set deprecated($core.bool v) {
     $_setBool(0, v);
   }
 
-  bool hasDeprecated() => $_has(0);
+  $core.bool hasDeprecated() => $_has(0);
   void clearDeprecated() => clearField(1);
 
-  List<UninterpretedOption> get uninterpretedOption => $_getList(1);
+  $core.List<UninterpretedOption> get uninterpretedOption => $_getList(1);
 }
 
 class ServiceOptions extends $pb.GeneratedMessage {
@@ -1242,10 +1181,10 @@
     ..hasExtensions = true;
 
   ServiceOptions() : super();
-  ServiceOptions.fromBuffer(List<int> i,
+  ServiceOptions.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  ServiceOptions.fromJson(String i,
+  ServiceOptions.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   ServiceOptions clone() => new ServiceOptions()..mergeFromMessage(this);
@@ -1258,19 +1197,16 @@
       new $pb.PbList<ServiceOptions>();
   static ServiceOptions getDefault() => _defaultInstance ??= create()..freeze();
   static ServiceOptions _defaultInstance;
-  static void $checkItem(ServiceOptions v) {
-    if (v is! ServiceOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  bool get deprecated => $_get(0, false);
-  set deprecated(bool v) {
+  $core.bool get deprecated => $_get(0, false);
+  set deprecated($core.bool v) {
     $_setBool(0, v);
   }
 
-  bool hasDeprecated() => $_has(0);
+  $core.bool hasDeprecated() => $_has(0);
   void clearDeprecated() => clearField(33);
 
-  List<UninterpretedOption> get uninterpretedOption => $_getList(1);
+  $core.List<UninterpretedOption> get uninterpretedOption => $_getList(1);
 }
 
 class MethodOptions extends $pb.GeneratedMessage {
@@ -1289,10 +1225,10 @@
     ..hasExtensions = true;
 
   MethodOptions() : super();
-  MethodOptions.fromBuffer(List<int> i,
+  MethodOptions.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  MethodOptions.fromJson(String i,
+  MethodOptions.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   MethodOptions clone() => new MethodOptions()..mergeFromMessage(this);
@@ -1305,16 +1241,13 @@
       new $pb.PbList<MethodOptions>();
   static MethodOptions getDefault() => _defaultInstance ??= create()..freeze();
   static MethodOptions _defaultInstance;
-  static void $checkItem(MethodOptions v) {
-    if (v is! MethodOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  bool get deprecated => $_get(0, false);
-  set deprecated(bool v) {
+  $core.bool get deprecated => $_get(0, false);
+  set deprecated($core.bool v) {
     $_setBool(0, v);
   }
 
-  bool hasDeprecated() => $_has(0);
+  $core.bool hasDeprecated() => $_has(0);
   void clearDeprecated() => clearField(33);
 
   MethodOptions_IdempotencyLevel get idempotencyLevel => $_getN(1);
@@ -1322,10 +1255,10 @@
     setField(34, v);
   }
 
-  bool hasIdempotencyLevel() => $_has(1);
+  $core.bool hasIdempotencyLevel() => $_has(1);
   void clearIdempotencyLevel() => clearField(34);
 
-  List<UninterpretedOption> get uninterpretedOption => $_getList(2);
+  $core.List<UninterpretedOption> get uninterpretedOption => $_getList(2);
 }
 
 class UninterpretedOption_NamePart extends $pb.GeneratedMessage {
@@ -1333,13 +1266,13 @@
       'UninterpretedOption.NamePart',
       package: const $pb.PackageName('google.protobuf'))
     ..aQS(1, 'namePart')
-    ..a<bool>(2, 'isExtension', $pb.PbFieldType.QB);
+    ..a<$core.bool>(2, 'isExtension', $pb.PbFieldType.QB);
 
   UninterpretedOption_NamePart() : super();
-  UninterpretedOption_NamePart.fromBuffer(List<int> i,
+  UninterpretedOption_NamePart.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  UninterpretedOption_NamePart.fromJson(String i,
+  UninterpretedOption_NamePart.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   UninterpretedOption_NamePart clone() =>
@@ -1357,25 +1290,21 @@
   static UninterpretedOption_NamePart getDefault() =>
       _defaultInstance ??= create()..freeze();
   static UninterpretedOption_NamePart _defaultInstance;
-  static void $checkItem(UninterpretedOption_NamePart v) {
-    if (v is! UninterpretedOption_NamePart)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get namePart => $_getS(0, '');
-  set namePart(String v) {
+  $core.String get namePart => $_getS(0, '');
+  set namePart($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasNamePart() => $_has(0);
+  $core.bool hasNamePart() => $_has(0);
   void clearNamePart() => clearField(1);
 
-  bool get isExtension => $_get(1, false);
-  set isExtension(bool v) {
+  $core.bool get isExtension => $_get(1, false);
+  set isExtension($core.bool v) {
     $_setBool(1, v);
   }
 
-  bool hasIsExtension() => $_has(1);
+  $core.bool hasIsExtension() => $_has(1);
   void clearIsExtension() => clearField(2);
 }
 
@@ -1387,15 +1316,15 @@
     ..aOS(3, 'identifierValue')
     ..a<Int64>(4, 'positiveIntValue', $pb.PbFieldType.OU6, Int64.ZERO)
     ..aInt64(5, 'negativeIntValue')
-    ..a<double>(6, 'doubleValue', $pb.PbFieldType.OD)
-    ..a<List<int>>(7, 'stringValue', $pb.PbFieldType.OY)
+    ..a<$core.double>(6, 'doubleValue', $pb.PbFieldType.OD)
+    ..a<$core.List<$core.int>>(7, 'stringValue', $pb.PbFieldType.OY)
     ..aOS(8, 'aggregateValue');
 
   UninterpretedOption() : super();
-  UninterpretedOption.fromBuffer(List<int> i,
+  UninterpretedOption.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  UninterpretedOption.fromJson(String i,
+  UninterpretedOption.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   UninterpretedOption clone() =>
@@ -1410,19 +1339,15 @@
   static UninterpretedOption getDefault() =>
       _defaultInstance ??= create()..freeze();
   static UninterpretedOption _defaultInstance;
-  static void $checkItem(UninterpretedOption v) {
-    if (v is! UninterpretedOption)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  List<UninterpretedOption_NamePart> get name => $_getList(0);
+  $core.List<UninterpretedOption_NamePart> get name => $_getList(0);
 
-  String get identifierValue => $_getS(1, '');
-  set identifierValue(String v) {
+  $core.String get identifierValue => $_getS(1, '');
+  set identifierValue($core.String v) {
     $_setString(1, v);
   }
 
-  bool hasIdentifierValue() => $_has(1);
+  $core.bool hasIdentifierValue() => $_has(1);
   void clearIdentifierValue() => clearField(3);
 
   Int64 get positiveIntValue => $_getI64(2);
@@ -1430,7 +1355,7 @@
     $_setInt64(2, v);
   }
 
-  bool hasPositiveIntValue() => $_has(2);
+  $core.bool hasPositiveIntValue() => $_has(2);
   void clearPositiveIntValue() => clearField(4);
 
   Int64 get negativeIntValue => $_getI64(3);
@@ -1438,31 +1363,31 @@
     $_setInt64(3, v);
   }
 
-  bool hasNegativeIntValue() => $_has(3);
+  $core.bool hasNegativeIntValue() => $_has(3);
   void clearNegativeIntValue() => clearField(5);
 
-  double get doubleValue => $_getN(4);
-  set doubleValue(double v) {
+  $core.double get doubleValue => $_getN(4);
+  set doubleValue($core.double v) {
     $_setDouble(4, v);
   }
 
-  bool hasDoubleValue() => $_has(4);
+  $core.bool hasDoubleValue() => $_has(4);
   void clearDoubleValue() => clearField(6);
 
-  List<int> get stringValue => $_getN(5);
-  set stringValue(List<int> v) {
+  $core.List<$core.int> get stringValue => $_getN(5);
+  set stringValue($core.List<$core.int> v) {
     $_setBytes(5, v);
   }
 
-  bool hasStringValue() => $_has(5);
+  $core.bool hasStringValue() => $_has(5);
   void clearStringValue() => clearField(7);
 
-  String get aggregateValue => $_getS(6, '');
-  set aggregateValue(String v) {
+  $core.String get aggregateValue => $_getS(6, '');
+  set aggregateValue($core.String v) {
     $_setString(6, v);
   }
 
-  bool hasAggregateValue() => $_has(6);
+  $core.bool hasAggregateValue() => $_has(6);
   void clearAggregateValue() => clearField(8);
 }
 
@@ -1470,18 +1395,18 @@
   static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
       'SourceCodeInfo.Location',
       package: const $pb.PackageName('google.protobuf'))
-    ..p<int>(1, 'path', $pb.PbFieldType.K3)
-    ..p<int>(2, 'span', $pb.PbFieldType.K3)
+    ..p<$core.int>(1, 'path', $pb.PbFieldType.K3)
+    ..p<$core.int>(2, 'span', $pb.PbFieldType.K3)
     ..aOS(3, 'leadingComments')
     ..aOS(4, 'trailingComments')
     ..pPS(6, 'leadingDetachedComments')
     ..hasRequiredFields = false;
 
   SourceCodeInfo_Location() : super();
-  SourceCodeInfo_Location.fromBuffer(List<int> i,
+  SourceCodeInfo_Location.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  SourceCodeInfo_Location.fromJson(String i,
+  SourceCodeInfo_Location.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   SourceCodeInfo_Location clone() =>
@@ -1497,32 +1422,28 @@
   static SourceCodeInfo_Location getDefault() =>
       _defaultInstance ??= create()..freeze();
   static SourceCodeInfo_Location _defaultInstance;
-  static void $checkItem(SourceCodeInfo_Location v) {
-    if (v is! SourceCodeInfo_Location)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  List<int> get path => $_getList(0);
+  $core.List<$core.int> get path => $_getList(0);
 
-  List<int> get span => $_getList(1);
+  $core.List<$core.int> get span => $_getList(1);
 
-  String get leadingComments => $_getS(2, '');
-  set leadingComments(String v) {
+  $core.String get leadingComments => $_getS(2, '');
+  set leadingComments($core.String v) {
     $_setString(2, v);
   }
 
-  bool hasLeadingComments() => $_has(2);
+  $core.bool hasLeadingComments() => $_has(2);
   void clearLeadingComments() => clearField(3);
 
-  String get trailingComments => $_getS(3, '');
-  set trailingComments(String v) {
+  $core.String get trailingComments => $_getS(3, '');
+  set trailingComments($core.String v) {
     $_setString(3, v);
   }
 
-  bool hasTrailingComments() => $_has(3);
+  $core.bool hasTrailingComments() => $_has(3);
   void clearTrailingComments() => clearField(4);
 
-  List<String> get leadingDetachedComments => $_getList(4);
+  $core.List<$core.String> get leadingDetachedComments => $_getList(4);
 }
 
 class SourceCodeInfo extends $pb.GeneratedMessage {
@@ -1533,10 +1454,10 @@
     ..hasRequiredFields = false;
 
   SourceCodeInfo() : super();
-  SourceCodeInfo.fromBuffer(List<int> i,
+  SourceCodeInfo.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  SourceCodeInfo.fromJson(String i,
+  SourceCodeInfo.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   SourceCodeInfo clone() => new SourceCodeInfo()..mergeFromMessage(this);
@@ -1549,28 +1470,25 @@
       new $pb.PbList<SourceCodeInfo>();
   static SourceCodeInfo getDefault() => _defaultInstance ??= create()..freeze();
   static SourceCodeInfo _defaultInstance;
-  static void $checkItem(SourceCodeInfo v) {
-    if (v is! SourceCodeInfo) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  List<SourceCodeInfo_Location> get location => $_getList(0);
+  $core.List<SourceCodeInfo_Location> get location => $_getList(0);
 }
 
 class GeneratedCodeInfo_Annotation extends $pb.GeneratedMessage {
   static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
       'GeneratedCodeInfo.Annotation',
       package: const $pb.PackageName('google.protobuf'))
-    ..p<int>(1, 'path', $pb.PbFieldType.K3)
+    ..p<$core.int>(1, 'path', $pb.PbFieldType.K3)
     ..aOS(2, 'sourceFile')
-    ..a<int>(3, 'begin', $pb.PbFieldType.O3)
-    ..a<int>(4, 'end', $pb.PbFieldType.O3)
+    ..a<$core.int>(3, 'begin', $pb.PbFieldType.O3)
+    ..a<$core.int>(4, 'end', $pb.PbFieldType.O3)
     ..hasRequiredFields = false;
 
   GeneratedCodeInfo_Annotation() : super();
-  GeneratedCodeInfo_Annotation.fromBuffer(List<int> i,
+  GeneratedCodeInfo_Annotation.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  GeneratedCodeInfo_Annotation.fromJson(String i,
+  GeneratedCodeInfo_Annotation.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   GeneratedCodeInfo_Annotation clone() =>
@@ -1588,35 +1506,31 @@
   static GeneratedCodeInfo_Annotation getDefault() =>
       _defaultInstance ??= create()..freeze();
   static GeneratedCodeInfo_Annotation _defaultInstance;
-  static void $checkItem(GeneratedCodeInfo_Annotation v) {
-    if (v is! GeneratedCodeInfo_Annotation)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  List<int> get path => $_getList(0);
+  $core.List<$core.int> get path => $_getList(0);
 
-  String get sourceFile => $_getS(1, '');
-  set sourceFile(String v) {
+  $core.String get sourceFile => $_getS(1, '');
+  set sourceFile($core.String v) {
     $_setString(1, v);
   }
 
-  bool hasSourceFile() => $_has(1);
+  $core.bool hasSourceFile() => $_has(1);
   void clearSourceFile() => clearField(2);
 
-  int get begin => $_get(2, 0);
-  set begin(int v) {
+  $core.int get begin => $_get(2, 0);
+  set begin($core.int v) {
     $_setSignedInt32(2, v);
   }
 
-  bool hasBegin() => $_has(2);
+  $core.bool hasBegin() => $_has(2);
   void clearBegin() => clearField(3);
 
-  int get end => $_get(3, 0);
-  set end(int v) {
+  $core.int get end => $_get(3, 0);
+  set end($core.int v) {
     $_setSignedInt32(3, v);
   }
 
-  bool hasEnd() => $_has(3);
+  $core.bool hasEnd() => $_has(3);
   void clearEnd() => clearField(4);
 }
 
@@ -1628,10 +1542,10 @@
     ..hasRequiredFields = false;
 
   GeneratedCodeInfo() : super();
-  GeneratedCodeInfo.fromBuffer(List<int> i,
+  GeneratedCodeInfo.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  GeneratedCodeInfo.fromJson(String i,
+  GeneratedCodeInfo.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   GeneratedCodeInfo clone() => new GeneratedCodeInfo()..mergeFromMessage(this);
@@ -1645,10 +1559,6 @@
   static GeneratedCodeInfo getDefault() =>
       _defaultInstance ??= create()..freeze();
   static GeneratedCodeInfo _defaultInstance;
-  static void $checkItem(GeneratedCodeInfo v) {
-    if (v is! GeneratedCodeInfo)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  List<GeneratedCodeInfo_Annotation> get annotation => $_getList(0);
+  $core.List<GeneratedCodeInfo_Annotation> get annotation => $_getList(0);
 }
diff --git a/protoc_plugin/lib/src/descriptor.pbenum.dart b/protoc_plugin/lib/src/descriptor.pbenum.dart
index a25cda6..bd33ef5 100644
--- a/protoc_plugin/lib/src/descriptor.pbenum.dart
+++ b/protoc_plugin/lib/src/descriptor.pbenum.dart
@@ -2,10 +2,10 @@
 //  Generated code. Do not modify.
 //  source: descriptor.proto
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME
-import 'dart:core' show int, dynamic, String, List, Map;
+import 'dart:core' as $core show int, dynamic, String, List, Map;
 import 'package:protobuf/protobuf.dart' as $pb;
 
 class FieldDescriptorProto_Type extends $pb.ProtobufEnum {
@@ -46,7 +46,7 @@
   static const FieldDescriptorProto_Type TYPE_SINT64 =
       const FieldDescriptorProto_Type._(18, 'TYPE_SINT64');
 
-  static const List<FieldDescriptorProto_Type> values =
+  static const $core.List<FieldDescriptorProto_Type> values =
       const <FieldDescriptorProto_Type>[
     TYPE_DOUBLE,
     TYPE_FLOAT,
@@ -68,15 +68,11 @@
     TYPE_SINT64,
   ];
 
-  static final Map<int, FieldDescriptorProto_Type> _byValue =
+  static final $core.Map<$core.int, FieldDescriptorProto_Type> _byValue =
       $pb.ProtobufEnum.initByValue(values);
-  static FieldDescriptorProto_Type valueOf(int value) => _byValue[value];
-  static void $checkItem(FieldDescriptorProto_Type v) {
-    if (v is! FieldDescriptorProto_Type)
-      $pb.checkItemFailed(v, 'FieldDescriptorProto_Type');
-  }
+  static FieldDescriptorProto_Type valueOf($core.int value) => _byValue[value];
 
-  const FieldDescriptorProto_Type._(int v, String n) : super(v, n);
+  const FieldDescriptorProto_Type._($core.int v, $core.String n) : super(v, n);
 }
 
 class FieldDescriptorProto_Label extends $pb.ProtobufEnum {
@@ -87,22 +83,18 @@
   static const FieldDescriptorProto_Label LABEL_REPEATED =
       const FieldDescriptorProto_Label._(3, 'LABEL_REPEATED');
 
-  static const List<FieldDescriptorProto_Label> values =
+  static const $core.List<FieldDescriptorProto_Label> values =
       const <FieldDescriptorProto_Label>[
     LABEL_OPTIONAL,
     LABEL_REQUIRED,
     LABEL_REPEATED,
   ];
 
-  static final Map<int, FieldDescriptorProto_Label> _byValue =
+  static final $core.Map<$core.int, FieldDescriptorProto_Label> _byValue =
       $pb.ProtobufEnum.initByValue(values);
-  static FieldDescriptorProto_Label valueOf(int value) => _byValue[value];
-  static void $checkItem(FieldDescriptorProto_Label v) {
-    if (v is! FieldDescriptorProto_Label)
-      $pb.checkItemFailed(v, 'FieldDescriptorProto_Label');
-  }
+  static FieldDescriptorProto_Label valueOf($core.int value) => _byValue[value];
 
-  const FieldDescriptorProto_Label._(int v, String n) : super(v, n);
+  const FieldDescriptorProto_Label._($core.int v, $core.String n) : super(v, n);
 }
 
 class FileOptions_OptimizeMode extends $pb.ProtobufEnum {
@@ -113,22 +105,18 @@
   static const FileOptions_OptimizeMode LITE_RUNTIME =
       const FileOptions_OptimizeMode._(3, 'LITE_RUNTIME');
 
-  static const List<FileOptions_OptimizeMode> values =
+  static const $core.List<FileOptions_OptimizeMode> values =
       const <FileOptions_OptimizeMode>[
     SPEED,
     CODE_SIZE,
     LITE_RUNTIME,
   ];
 
-  static final Map<int, FileOptions_OptimizeMode> _byValue =
+  static final $core.Map<$core.int, FileOptions_OptimizeMode> _byValue =
       $pb.ProtobufEnum.initByValue(values);
-  static FileOptions_OptimizeMode valueOf(int value) => _byValue[value];
-  static void $checkItem(FileOptions_OptimizeMode v) {
-    if (v is! FileOptions_OptimizeMode)
-      $pb.checkItemFailed(v, 'FileOptions_OptimizeMode');
-  }
+  static FileOptions_OptimizeMode valueOf($core.int value) => _byValue[value];
 
-  const FileOptions_OptimizeMode._(int v, String n) : super(v, n);
+  const FileOptions_OptimizeMode._($core.int v, $core.String n) : super(v, n);
 }
 
 class FieldOptions_CType extends $pb.ProtobufEnum {
@@ -138,20 +126,18 @@
   static const FieldOptions_CType STRING_PIECE =
       const FieldOptions_CType._(2, 'STRING_PIECE');
 
-  static const List<FieldOptions_CType> values = const <FieldOptions_CType>[
+  static const $core.List<FieldOptions_CType> values =
+      const <FieldOptions_CType>[
     STRING,
     CORD,
     STRING_PIECE,
   ];
 
-  static final Map<int, FieldOptions_CType> _byValue =
+  static final $core.Map<$core.int, FieldOptions_CType> _byValue =
       $pb.ProtobufEnum.initByValue(values);
-  static FieldOptions_CType valueOf(int value) => _byValue[value];
-  static void $checkItem(FieldOptions_CType v) {
-    if (v is! FieldOptions_CType) $pb.checkItemFailed(v, 'FieldOptions_CType');
-  }
+  static FieldOptions_CType valueOf($core.int value) => _byValue[value];
 
-  const FieldOptions_CType._(int v, String n) : super(v, n);
+  const FieldOptions_CType._($core.int v, $core.String n) : super(v, n);
 }
 
 class FieldOptions_JSType extends $pb.ProtobufEnum {
@@ -162,21 +148,18 @@
   static const FieldOptions_JSType JS_NUMBER =
       const FieldOptions_JSType._(2, 'JS_NUMBER');
 
-  static const List<FieldOptions_JSType> values = const <FieldOptions_JSType>[
+  static const $core.List<FieldOptions_JSType> values =
+      const <FieldOptions_JSType>[
     JS_NORMAL,
     JS_STRING,
     JS_NUMBER,
   ];
 
-  static final Map<int, FieldOptions_JSType> _byValue =
+  static final $core.Map<$core.int, FieldOptions_JSType> _byValue =
       $pb.ProtobufEnum.initByValue(values);
-  static FieldOptions_JSType valueOf(int value) => _byValue[value];
-  static void $checkItem(FieldOptions_JSType v) {
-    if (v is! FieldOptions_JSType)
-      $pb.checkItemFailed(v, 'FieldOptions_JSType');
-  }
+  static FieldOptions_JSType valueOf($core.int value) => _byValue[value];
 
-  const FieldOptions_JSType._(int v, String n) : super(v, n);
+  const FieldOptions_JSType._($core.int v, $core.String n) : super(v, n);
 }
 
 class MethodOptions_IdempotencyLevel extends $pb.ProtobufEnum {
@@ -187,20 +170,18 @@
   static const MethodOptions_IdempotencyLevel IDEMPOTENT =
       const MethodOptions_IdempotencyLevel._(2, 'IDEMPOTENT');
 
-  static const List<MethodOptions_IdempotencyLevel> values =
+  static const $core.List<MethodOptions_IdempotencyLevel> values =
       const <MethodOptions_IdempotencyLevel>[
     IDEMPOTENCY_UNKNOWN,
     NO_SIDE_EFFECTS,
     IDEMPOTENT,
   ];
 
-  static final Map<int, MethodOptions_IdempotencyLevel> _byValue =
+  static final $core.Map<$core.int, MethodOptions_IdempotencyLevel> _byValue =
       $pb.ProtobufEnum.initByValue(values);
-  static MethodOptions_IdempotencyLevel valueOf(int value) => _byValue[value];
-  static void $checkItem(MethodOptions_IdempotencyLevel v) {
-    if (v is! MethodOptions_IdempotencyLevel)
-      $pb.checkItemFailed(v, 'MethodOptions_IdempotencyLevel');
-  }
+  static MethodOptions_IdempotencyLevel valueOf($core.int value) =>
+      _byValue[value];
 
-  const MethodOptions_IdempotencyLevel._(int v, String n) : super(v, n);
+  const MethodOptions_IdempotencyLevel._($core.int v, $core.String n)
+      : super(v, n);
 }
diff --git a/protoc_plugin/lib/src/plugin.pb.dart b/protoc_plugin/lib/src/plugin.pb.dart
index 0deb2e1..f392d08 100644
--- a/protoc_plugin/lib/src/plugin.pb.dart
+++ b/protoc_plugin/lib/src/plugin.pb.dart
@@ -2,10 +2,10 @@
 //  Generated code. Do not modify.
 //  source: plugin.proto
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
+import 'dart:core' as $core show int, bool, double, String, List, Map, override;
 
 import 'package:protobuf/protobuf.dart' as $pb;
 
@@ -14,17 +14,17 @@
 class Version extends $pb.GeneratedMessage {
   static final $pb.BuilderInfo _i = new $pb.BuilderInfo('Version',
       package: const $pb.PackageName('google.protobuf.compiler'))
-    ..a<int>(1, 'major', $pb.PbFieldType.O3)
-    ..a<int>(2, 'minor', $pb.PbFieldType.O3)
-    ..a<int>(3, 'patch', $pb.PbFieldType.O3)
+    ..a<$core.int>(1, 'major', $pb.PbFieldType.O3)
+    ..a<$core.int>(2, 'minor', $pb.PbFieldType.O3)
+    ..a<$core.int>(3, 'patch', $pb.PbFieldType.O3)
     ..aOS(4, 'suffix')
     ..hasRequiredFields = false;
 
   Version() : super();
-  Version.fromBuffer(List<int> i,
+  Version.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  Version.fromJson(String i,
+  Version.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   Version clone() => new Version()..mergeFromMessage(this);
@@ -36,40 +36,37 @@
   static $pb.PbList<Version> createRepeated() => new $pb.PbList<Version>();
   static Version getDefault() => _defaultInstance ??= create()..freeze();
   static Version _defaultInstance;
-  static void $checkItem(Version v) {
-    if (v is! Version) $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  int get major => $_get(0, 0);
-  set major(int v) {
+  $core.int get major => $_get(0, 0);
+  set major($core.int v) {
     $_setSignedInt32(0, v);
   }
 
-  bool hasMajor() => $_has(0);
+  $core.bool hasMajor() => $_has(0);
   void clearMajor() => clearField(1);
 
-  int get minor => $_get(1, 0);
-  set minor(int v) {
+  $core.int get minor => $_get(1, 0);
+  set minor($core.int v) {
     $_setSignedInt32(1, v);
   }
 
-  bool hasMinor() => $_has(1);
+  $core.bool hasMinor() => $_has(1);
   void clearMinor() => clearField(2);
 
-  int get patch => $_get(2, 0);
-  set patch(int v) {
+  $core.int get patch => $_get(2, 0);
+  set patch($core.int v) {
     $_setSignedInt32(2, v);
   }
 
-  bool hasPatch() => $_has(2);
+  $core.bool hasPatch() => $_has(2);
   void clearPatch() => clearField(3);
 
-  String get suffix => $_getS(3, '');
-  set suffix(String v) {
+  $core.String get suffix => $_getS(3, '');
+  set suffix($core.String v) {
     $_setString(3, v);
   }
 
-  bool hasSuffix() => $_has(3);
+  $core.bool hasSuffix() => $_has(3);
   void clearSuffix() => clearField(4);
 }
 
@@ -84,10 +81,10 @@
         15, 'protoFile', $pb.PbFieldType.PM, $0.FileDescriptorProto.create);
 
   CodeGeneratorRequest() : super();
-  CodeGeneratorRequest.fromBuffer(List<int> i,
+  CodeGeneratorRequest.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  CodeGeneratorRequest.fromJson(String i,
+  CodeGeneratorRequest.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   CodeGeneratorRequest clone() =>
@@ -102,19 +99,15 @@
   static CodeGeneratorRequest getDefault() =>
       _defaultInstance ??= create()..freeze();
   static CodeGeneratorRequest _defaultInstance;
-  static void $checkItem(CodeGeneratorRequest v) {
-    if (v is! CodeGeneratorRequest)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  List<String> get fileToGenerate => $_getList(0);
+  $core.List<$core.String> get fileToGenerate => $_getList(0);
 
-  String get parameter => $_getS(1, '');
-  set parameter(String v) {
+  $core.String get parameter => $_getS(1, '');
+  set parameter($core.String v) {
     $_setString(1, v);
   }
 
-  bool hasParameter() => $_has(1);
+  $core.bool hasParameter() => $_has(1);
   void clearParameter() => clearField(2);
 
   Version get compilerVersion => $_getN(2);
@@ -122,10 +115,10 @@
     setField(3, v);
   }
 
-  bool hasCompilerVersion() => $_has(2);
+  $core.bool hasCompilerVersion() => $_has(2);
   void clearCompilerVersion() => clearField(3);
 
-  List<$0.FileDescriptorProto> get protoFile => $_getList(3);
+  $core.List<$0.FileDescriptorProto> get protoFile => $_getList(3);
 }
 
 class CodeGeneratorResponse_File extends $pb.GeneratedMessage {
@@ -138,10 +131,10 @@
     ..hasRequiredFields = false;
 
   CodeGeneratorResponse_File() : super();
-  CodeGeneratorResponse_File.fromBuffer(List<int> i,
+  CodeGeneratorResponse_File.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  CodeGeneratorResponse_File.fromJson(String i,
+  CodeGeneratorResponse_File.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   CodeGeneratorResponse_File clone() =>
@@ -159,33 +152,29 @@
   static CodeGeneratorResponse_File getDefault() =>
       _defaultInstance ??= create()..freeze();
   static CodeGeneratorResponse_File _defaultInstance;
-  static void $checkItem(CodeGeneratorResponse_File v) {
-    if (v is! CodeGeneratorResponse_File)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get name => $_getS(0, '');
-  set name(String v) {
+  $core.String get name => $_getS(0, '');
+  set name($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasName() => $_has(0);
+  $core.bool hasName() => $_has(0);
   void clearName() => clearField(1);
 
-  String get insertionPoint => $_getS(1, '');
-  set insertionPoint(String v) {
+  $core.String get insertionPoint => $_getS(1, '');
+  set insertionPoint($core.String v) {
     $_setString(1, v);
   }
 
-  bool hasInsertionPoint() => $_has(1);
+  $core.bool hasInsertionPoint() => $_has(1);
   void clearInsertionPoint() => clearField(2);
 
-  String get content => $_getS(2, '');
-  set content(String v) {
+  $core.String get content => $_getS(2, '');
+  set content($core.String v) {
     $_setString(2, v);
   }
 
-  bool hasContent() => $_has(2);
+  $core.bool hasContent() => $_has(2);
   void clearContent() => clearField(15);
 }
 
@@ -198,10 +187,10 @@
     ..hasRequiredFields = false;
 
   CodeGeneratorResponse() : super();
-  CodeGeneratorResponse.fromBuffer(List<int> i,
+  CodeGeneratorResponse.fromBuffer($core.List<$core.int> i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromBuffer(i, r);
-  CodeGeneratorResponse.fromJson(String i,
+  CodeGeneratorResponse.fromJson($core.String i,
       [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
       : super.fromJson(i, r);
   CodeGeneratorResponse clone() =>
@@ -217,18 +206,14 @@
   static CodeGeneratorResponse getDefault() =>
       _defaultInstance ??= create()..freeze();
   static CodeGeneratorResponse _defaultInstance;
-  static void $checkItem(CodeGeneratorResponse v) {
-    if (v is! CodeGeneratorResponse)
-      $pb.checkItemFailed(v, _i.qualifiedMessageName);
-  }
 
-  String get error => $_getS(0, '');
-  set error(String v) {
+  $core.String get error => $_getS(0, '');
+  set error($core.String v) {
     $_setString(0, v);
   }
 
-  bool hasError() => $_has(0);
+  $core.bool hasError() => $_has(0);
   void clearError() => clearField(1);
 
-  List<CodeGeneratorResponse_File> get file => $_getList(1);
+  $core.List<CodeGeneratorResponse_File> get file => $_getList(1);
 }
diff --git a/protoc_plugin/lib/well_known_types.dart b/protoc_plugin/lib/well_known_types.dart
index 6f4fb78..f6f30e7 100644
--- a/protoc_plugin/lib/well_known_types.dart
+++ b/protoc_plugin/lib/well_known_types.dart
@@ -39,7 +39,7 @@
   ///
   /// Can be used with a default instance:
   /// `any.canUnpackInto(Message.getDefault())`
-  bool canUnpackInto($_protobufImportPrefix.GeneratedMessage instance) {
+  $_coreImportPrefix.bool canUnpackInto($_protobufImportPrefix.GeneratedMessage instance) {
     return $_protobufImportPrefix.canUnpackIntoHelper(instance, typeUrl);
   }
 
@@ -48,7 +48,7 @@
   /// The [typeUrl] will be [typeUrlPrefix]/`fullName` where `fullName` is
   /// the fully qualified name of the type of [message].
   static Any pack($_protobufImportPrefix.GeneratedMessage message,
-      {String typeUrlPrefix = 'type.googleapis.com'}) {
+      {$_coreImportPrefix.String typeUrlPrefix = 'type.googleapis.com'}) {
     return new Any()
       ..value = message.writeToBuffer()
       ..typeUrl = '\${typeUrlPrefix}/\${message.info_.qualifiedMessageName}';
@@ -64,23 +64,23 @@
 
   @override
   void generateMethods(IndentingWriter out) {
-    out.println(r'''
+    out.println('''
   /// Converts an instance to [DateTime].
   ///
   /// The result is in UTC time zone and has microsecond precision, as
   /// [DateTime] does not support nanosecond precision.
-  $core.DateTime toDateTime() => new $core.DateTime.fromMicrosecondsSinceEpoch(
-      seconds.toInt() * $core.Duration.microsecondsPerSecond + nanos ~/ 1000,
+  $_coreImportPrefix.DateTime toDateTime() => new $_coreImportPrefix.DateTime.fromMicrosecondsSinceEpoch(
+      seconds.toInt() * $_coreImportPrefix.Duration.microsecondsPerSecond + nanos ~/ 1000,
       isUtc: true);
 
   /// Creates a new instance from [dateTime].
   ///
   /// Time zone information will not be preserved.
-  static Timestamp fromDateTime($core.DateTime dateTime) {
-    int micros = dateTime.microsecondsSinceEpoch;
+  static Timestamp fromDateTime($_coreImportPrefix.DateTime dateTime) {
+    $_coreImportPrefix.int micros = dateTime.microsecondsSinceEpoch;
     return new Timestamp()
-      ..seconds = new Int64(micros ~/ $core.Duration.microsecondsPerSecond)
-      ..nanos = (micros % $core.Duration.microsecondsPerSecond).toInt() * 1000;
+      ..seconds = new Int64(micros ~/ $_coreImportPrefix.Duration.microsecondsPerSecond)
+      ..nanos = (micros % $_coreImportPrefix.Duration.microsecondsPerSecond).toInt() * 1000;
   }''');
   }
 }
diff --git a/protoc_plugin/pubspec.yaml b/protoc_plugin/pubspec.yaml
index 2096be9..e5c8601 100644
--- a/protoc_plugin/pubspec.yaml
+++ b/protoc_plugin/pubspec.yaml
@@ -1,5 +1,5 @@
 name: protoc_plugin
-version: 16.0.1
+version: 16.0.2
 author: Dart Team <misc@dartlang.org>
 description: Protoc compiler plugin to generate Dart code
 homepage: https://github.com/dart-lang/protobuf
diff --git a/protoc_plugin/test/goldens/enum b/protoc_plugin/test/goldens/enum
index 9e9ffab..ad7d6ed 100644
--- a/protoc_plugin/test/goldens/enum
+++ b/protoc_plugin/test/goldens/enum
@@ -5,15 +5,15 @@
 
   static const PhoneType BUSINESS = WORK;
 
-  static const List<PhoneType> values = const <PhoneType> [
+  static const $core.List<PhoneType> values = const <PhoneType> [
     MOBILE,
     HOME,
     WORK,
   ];
 
-  static final Map<int, PhoneType> _byValue = $pb.ProtobufEnum.initByValue(values);
-  static PhoneType valueOf(int value) => _byValue[value];
+  static final $core.Map<$core.int, PhoneType> _byValue = $pb.ProtobufEnum.initByValue(values);
+  static PhoneType valueOf($core.int value) => _byValue[value];
 
-  const PhoneType._(int v, String n) : super(v, n);
+  const PhoneType._($core.int v, $core.String n) : super(v, n);
 }
 
diff --git a/protoc_plugin/test/goldens/grpc_service.pb b/protoc_plugin/test/goldens/grpc_service.pb
index 6bb6b3f..0bbd43c 100644
--- a/protoc_plugin/test/goldens/grpc_service.pb
+++ b/protoc_plugin/test/goldens/grpc_service.pb
@@ -2,10 +2,10 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
+import 'dart:core' as $core show int, bool, double, String, List, Map, override;
 
 import 'package:protobuf/protobuf.dart' as $pb;
 
@@ -15,8 +15,8 @@
   ;
 
   Empty() : super();
-  Empty.fromBuffer(List<int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
-  Empty.fromJson(String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
+  Empty.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
+  Empty.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
   Empty clone() => new Empty()..mergeFromMessage(this);
   Empty copyWith(void Function(Empty) updates) => super.copyWith((message) => updates(message as Empty));
   $pb.BuilderInfo get info_ => _i;
diff --git a/protoc_plugin/test/goldens/grpc_service.pbgrpc b/protoc_plugin/test/goldens/grpc_service.pbgrpc
index 3f705e4..33762a0 100644
--- a/protoc_plugin/test/goldens/grpc_service.pbgrpc
+++ b/protoc_plugin/test/goldens/grpc_service.pbgrpc
@@ -2,11 +2,14 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 import 'dart:async' as $async;
 
 import 'package:grpc/service_api.dart' as $grpc;
+
+import 'dart:core' as $core show int, String, List;
+
 import 'test.pb.dart';
 export 'test.pb.dart';
 
@@ -14,19 +17,19 @@
   static final _$unary = new $grpc.ClientMethod<Input, Output>(
       '/Test/Unary',
       (Input value) => value.writeToBuffer(),
-      (List<int> value) => new Output.fromBuffer(value));
+      ($core.List<$core.int> value) => new Output.fromBuffer(value));
   static final _$clientStreaming = new $grpc.ClientMethod<Input, Output>(
       '/Test/ClientStreaming',
       (Input value) => value.writeToBuffer(),
-      (List<int> value) => new Output.fromBuffer(value));
+      ($core.List<$core.int> value) => new Output.fromBuffer(value));
   static final _$serverStreaming = new $grpc.ClientMethod<Input, Output>(
       '/Test/ServerStreaming',
       (Input value) => value.writeToBuffer(),
-      (List<int> value) => new Output.fromBuffer(value));
+      ($core.List<$core.int> value) => new Output.fromBuffer(value));
   static final _$bidirectional = new $grpc.ClientMethod<Input, Output>(
       '/Test/Bidirectional',
       (Input value) => value.writeToBuffer(),
-      (List<int> value) => new Output.fromBuffer(value));
+      ($core.List<$core.int> value) => new Output.fromBuffer(value));
 
   TestClient($grpc.ClientChannel channel, {$grpc.CallOptions options})
       : super(channel, options: options);
@@ -60,7 +63,7 @@
 }
 
 abstract class TestServiceBase extends $grpc.Service {
-  String get $name => 'Test';
+  $core.String get $name => 'Test';
 
   TestServiceBase() {
     $addMethod(new $grpc.ServiceMethod<Input, Output>(
@@ -68,28 +71,28 @@
         unary_Pre,
         false,
         false,
-        (List<int> value) => new Input.fromBuffer(value),
+        ($core.List<$core.int> value) => new Input.fromBuffer(value),
         (Output value) => value.writeToBuffer()));
     $addMethod(new $grpc.ServiceMethod<Input, Output>(
         'ClientStreaming',
         clientStreaming,
         true,
         false,
-        (List<int> value) => new Input.fromBuffer(value),
+        ($core.List<$core.int> value) => new Input.fromBuffer(value),
         (Output value) => value.writeToBuffer()));
     $addMethod(new $grpc.ServiceMethod<Input, Output>(
         'ServerStreaming',
         serverStreaming_Pre,
         false,
         true,
-        (List<int> value) => new Input.fromBuffer(value),
+        ($core.List<$core.int> value) => new Input.fromBuffer(value),
         (Output value) => value.writeToBuffer()));
     $addMethod(new $grpc.ServiceMethod<Input, Output>(
         'Bidirectional',
         bidirectional,
         true,
         true,
-        (List<int> value) => new Input.fromBuffer(value),
+        ($core.List<$core.int> value) => new Input.fromBuffer(value),
         (Output value) => value.writeToBuffer()));
   }
 
diff --git a/protoc_plugin/test/goldens/header_in_package.pb b/protoc_plugin/test/goldens/header_in_package.pb
index 0399a53..5257315 100644
--- a/protoc_plugin/test/goldens/header_in_package.pb
+++ b/protoc_plugin/test/goldens/header_in_package.pb
@@ -2,10 +2,10 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
+import 'dart:core' as $core show int, bool, double, String, List, Map, override;
 
 import 'package:protobuf/protobuf.dart' as $pb;
 
diff --git a/protoc_plugin/test/goldens/header_with_fixnum.pb b/protoc_plugin/test/goldens/header_with_fixnum.pb
index 9df6c14..216b79e 100644
--- a/protoc_plugin/test/goldens/header_with_fixnum.pb
+++ b/protoc_plugin/test/goldens/header_with_fixnum.pb
@@ -2,10 +2,10 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
+import 'dart:core' as $core show int, bool, double, String, List, Map, override;
 
 import 'package:fixnum/fixnum.dart';
 import 'package:protobuf/protobuf.dart' as $pb;
diff --git a/protoc_plugin/test/goldens/imports.pb b/protoc_plugin/test/goldens/imports.pb
index 917dcf8..419c861 100644
--- a/protoc_plugin/test/goldens/imports.pb
+++ b/protoc_plugin/test/goldens/imports.pb
@@ -2,10 +2,10 @@
 //  Generated code. Do not modify.
 //  source: test.proto
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
+import 'dart:core' as $core show int, bool, double, String, List, Map, override;
 
 import 'package:protobuf/protobuf.dart' as $pb;
 
@@ -21,8 +21,8 @@
   ;
 
   M() : super();
-  M.fromBuffer(List<int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
-  M.fromJson(String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
+  M.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
+  M.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
   M clone() => new M()..mergeFromMessage(this);
   M copyWith(void Function(M) updates) => super.copyWith((message) => updates(message as M));
   $pb.BuilderInfo get info_ => _i;
@@ -34,17 +34,17 @@
 
   M get m => $_getN(0);
   set m(M v) { setField(1, v); }
-  bool hasM() => $_has(0);
+  $core.bool hasM() => $_has(0);
   void clearM() => clearField(1);
 
   $0.M get m1 => $_getN(1);
   set m1($0.M v) { setField(2, v); }
-  bool hasM1() => $_has(1);
+  $core.bool hasM1() => $_has(1);
   void clearM1() => clearField(2);
 
   $1.M get m2 => $_getN(2);
   set m2($1.M v) { setField(3, v); }
-  bool hasM2() => $_has(2);
+  $core.bool hasM2() => $_has(2);
   void clearM2() => clearField(3);
 }
 
diff --git a/protoc_plugin/test/goldens/imports.pbjson b/protoc_plugin/test/goldens/imports.pbjson
index 02eb3e2..6e64abb 100644
--- a/protoc_plugin/test/goldens/imports.pbjson
+++ b/protoc_plugin/test/goldens/imports.pbjson
@@ -2,5 +2,5 @@
 //  Generated code. Do not modify.
 //  source: test.proto
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
diff --git a/protoc_plugin/test/goldens/messageGenerator b/protoc_plugin/test/goldens/messageGenerator
index b191638..62a9b85 100644
--- a/protoc_plugin/test/goldens/messageGenerator
+++ b/protoc_plugin/test/goldens/messageGenerator
@@ -2,12 +2,12 @@
   static final $pb.BuilderInfo _i = new $pb.BuilderInfo('PhoneNumber')
     ..aQS(1, 'number')
     ..e<PhoneNumber_PhoneType>(2, 'type', $pb.PbFieldType.OE, PhoneNumber_PhoneType.MOBILE, PhoneNumber_PhoneType.valueOf, PhoneNumber_PhoneType.values)
-    ..a<String>(3, 'name', $pb.PbFieldType.OS, '\$')
+    ..a<$core.String>(3, 'name', $pb.PbFieldType.OS, '\$')
   ;
 
   PhoneNumber() : super();
-  PhoneNumber.fromBuffer(List<int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
-  PhoneNumber.fromJson(String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
+  PhoneNumber.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
+  PhoneNumber.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
   PhoneNumber clone() => new PhoneNumber()..mergeFromMessage(this);
   PhoneNumber copyWith(void Function(PhoneNumber) updates) => super.copyWith((message) => updates(message as PhoneNumber));
   $pb.BuilderInfo get info_ => _i;
@@ -17,19 +17,19 @@
   static PhoneNumber getDefault() => _defaultInstance ??= create()..freeze();
   static PhoneNumber _defaultInstance;
 
-  String get number => $_getS(0, '');
-  set number(String v) { $_setString(0, v); }
-  bool hasNumber() => $_has(0);
+  $core.String get number => $_getS(0, '');
+  set number($core.String v) { $_setString(0, v); }
+  $core.bool hasNumber() => $_has(0);
   void clearNumber() => clearField(1);
 
   PhoneNumber_PhoneType get type => $_getN(1);
   set type(PhoneNumber_PhoneType v) { setField(2, v); }
-  bool hasType() => $_has(1);
+  $core.bool hasType() => $_has(1);
   void clearType() => clearField(2);
 
-  String get name => $_getS(2, '\$');
-  set name(String v) { $_setString(2, v); }
-  bool hasName() => $_has(2);
+  $core.String get name => $_getS(2, '\$');
+  set name($core.String v) { $_setString(2, v); }
+  $core.bool hasName() => $_has(2);
   void clearName() => clearField(3);
 }
 
diff --git a/protoc_plugin/test/goldens/messageGeneratorEnums b/protoc_plugin/test/goldens/messageGeneratorEnums
index 9efb67e..e7107a5 100644
--- a/protoc_plugin/test/goldens/messageGeneratorEnums
+++ b/protoc_plugin/test/goldens/messageGeneratorEnums
@@ -5,15 +5,15 @@
 
   static const PhoneNumber_PhoneType BUSINESS = WORK;
 
-  static const List<PhoneNumber_PhoneType> values = const <PhoneNumber_PhoneType> [
+  static const $core.List<PhoneNumber_PhoneType> values = const <PhoneNumber_PhoneType> [
     MOBILE,
     HOME,
     WORK,
   ];
 
-  static final Map<int, PhoneNumber_PhoneType> _byValue = $pb.ProtobufEnum.initByValue(values);
-  static PhoneNumber_PhoneType valueOf(int value) => _byValue[value];
+  static final $core.Map<$core.int, PhoneNumber_PhoneType> _byValue = $pb.ProtobufEnum.initByValue(values);
+  static PhoneNumber_PhoneType valueOf($core.int value) => _byValue[value];
 
-  const PhoneNumber_PhoneType._(int v, String n) : super(v, n);
+  const PhoneNumber_PhoneType._($core.int v, $core.String n) : super(v, n);
 }
 
diff --git a/protoc_plugin/test/goldens/oneMessage.pb b/protoc_plugin/test/goldens/oneMessage.pb
index 45c0e48..420bb71 100644
--- a/protoc_plugin/test/goldens/oneMessage.pb
+++ b/protoc_plugin/test/goldens/oneMessage.pb
@@ -2,23 +2,23 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
+import 'dart:core' as $core show int, bool, double, String, List, Map, override;
 
 import 'package:protobuf/protobuf.dart' as $pb;
 
 class PhoneNumber extends $pb.GeneratedMessage {
   static final $pb.BuilderInfo _i = new $pb.BuilderInfo('PhoneNumber')
     ..aQS(1, 'number')
-    ..a<int>(2, 'type', $pb.PbFieldType.O3)
-    ..a<String>(3, 'name', $pb.PbFieldType.OS, '\$')
+    ..a<$core.int>(2, 'type', $pb.PbFieldType.O3)
+    ..a<$core.String>(3, 'name', $pb.PbFieldType.OS, '\$')
   ;
 
   PhoneNumber() : super();
-  PhoneNumber.fromBuffer(List<int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
-  PhoneNumber.fromJson(String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
+  PhoneNumber.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
+  PhoneNumber.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
   PhoneNumber clone() => new PhoneNumber()..mergeFromMessage(this);
   PhoneNumber copyWith(void Function(PhoneNumber) updates) => super.copyWith((message) => updates(message as PhoneNumber));
   $pb.BuilderInfo get info_ => _i;
@@ -28,19 +28,19 @@
   static PhoneNumber getDefault() => _defaultInstance ??= create()..freeze();
   static PhoneNumber _defaultInstance;
 
-  String get number => $_getS(0, '');
-  set number(String v) { $_setString(0, v); }
-  bool hasNumber() => $_has(0);
+  $core.String get number => $_getS(0, '');
+  set number($core.String v) { $_setString(0, v); }
+  $core.bool hasNumber() => $_has(0);
   void clearNumber() => clearField(1);
 
-  int get type => $_get(1, 0);
-  set type(int v) { $_setSignedInt32(1, v); }
-  bool hasType() => $_has(1);
+  $core.int get type => $_get(1, 0);
+  set type($core.int v) { $_setSignedInt32(1, v); }
+  $core.bool hasType() => $_has(1);
   void clearType() => clearField(2);
 
-  String get name => $_getS(2, '\$');
-  set name(String v) { $_setString(2, v); }
-  bool hasName() => $_has(2);
+  $core.String get name => $_getS(2, '\$');
+  set name($core.String v) { $_setString(2, v); }
+  $core.bool hasName() => $_has(2);
   void clearName() => clearField(3);
 }
 
diff --git a/protoc_plugin/test/goldens/oneMessage.pb.meta b/protoc_plugin/test/goldens/oneMessage.pb.meta
index b264b07..38bd0c6 100644
--- a/protoc_plugin/test/goldens/oneMessage.pb.meta
+++ b/protoc_plugin/test/goldens/oneMessage.pb.meta
@@ -3,6 +3,6 @@
   path: 0
   path: 1
   sourceFile: test
-  begin: 299
-  end: 310
+  begin: 325
+  end: 336
 }
diff --git a/protoc_plugin/test/goldens/oneMessage.pbjson b/protoc_plugin/test/goldens/oneMessage.pbjson
index 15f916b..a5aec34 100644
--- a/protoc_plugin/test/goldens/oneMessage.pbjson
+++ b/protoc_plugin/test/goldens/oneMessage.pbjson
@@ -2,7 +2,7 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 const PhoneNumber$json = const {
   '1': 'PhoneNumber',
diff --git a/protoc_plugin/test/goldens/service.pb b/protoc_plugin/test/goldens/service.pb
index 11bbd11..dd9b6a6 100644
--- a/protoc_plugin/test/goldens/service.pb
+++ b/protoc_plugin/test/goldens/service.pb
@@ -2,11 +2,11 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 import 'dart:async' as $async;
 // ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
+import 'dart:core' as $core show int, bool, double, String, List, Map, override;
 
 import 'package:protobuf/protobuf.dart' as $pb;
 
@@ -16,8 +16,8 @@
   ;
 
   Empty() : super();
-  Empty.fromBuffer(List<int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
-  Empty.fromJson(String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
+  Empty.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
+  Empty.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
   Empty clone() => new Empty()..mergeFromMessage(this);
   Empty copyWith(void Function(Empty) updates) => super.copyWith((message) => updates(message as Empty));
   $pb.BuilderInfo get info_ => _i;
diff --git a/protoc_plugin/test/goldens/service.pbserver b/protoc_plugin/test/goldens/service.pbserver
index a80c7b0..4e5ba53 100644
--- a/protoc_plugin/test/goldens/service.pbserver
+++ b/protoc_plugin/test/goldens/service.pbserver
@@ -2,11 +2,13 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 import 'dart:async' as $async;
 
 import 'package:protobuf/protobuf.dart' as $pb;
+
+import 'dart:core' as $core show String, Map, ArgumentError, dynamic;
 import 'test.pb.dart';
 import 'test.pbjson.dart';
 
@@ -15,21 +17,21 @@
 abstract class TestServiceBase extends $pb.GeneratedService {
   $async.Future<Empty> ping($pb.ServerContext ctx, Empty request);
 
-  $pb.GeneratedMessage createRequest(String method) {
+  $pb.GeneratedMessage createRequest($core.String method) {
     switch (method) {
       case 'Ping': return new Empty();
-      default: throw new ArgumentError('Unknown method: $method');
+      default: throw new $core.ArgumentError('Unknown method: $method');
     }
   }
 
-  $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, String method, $pb.GeneratedMessage request) {
+  $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) {
     switch (method) {
       case 'Ping': return this.ping(ctx, request);
-      default: throw new ArgumentError('Unknown method: $method');
+      default: throw new $core.ArgumentError('Unknown method: $method');
     }
   }
 
-  Map<String, dynamic> get $json => TestServiceBase$json;
-  Map<String, Map<String, dynamic>> get $messageJson => TestServiceBase$messageJson;
+  $core.Map<$core.String, $core.dynamic> get $json => TestServiceBase$json;
+  $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => TestServiceBase$messageJson;
 }
 
diff --git a/protoc_plugin/test/goldens/serviceGenerator b/protoc_plugin/test/goldens/serviceGenerator
index f1c7397..f461773 100644
--- a/protoc_plugin/test/goldens/serviceGenerator
+++ b/protoc_plugin/test/goldens/serviceGenerator
@@ -2,23 +2,23 @@
   $async.Future<SomeReply> aMethod($pb.ServerContext ctx, SomeRequest request);
   $async.Future<$0.AnotherReply> anotherMethod($pb.ServerContext ctx, $0.EmptyMessage request);
 
-  $pb.GeneratedMessage createRequest(String method) {
+  $pb.GeneratedMessage createRequest($core.String method) {
     switch (method) {
       case 'AMethod': return new SomeRequest();
       case 'AnotherMethod': return new $0.EmptyMessage();
-      default: throw new ArgumentError('Unknown method: $method');
+      default: throw new $core.ArgumentError('Unknown method: $method');
     }
   }
 
-  $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, String method, $pb.GeneratedMessage request) {
+  $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) {
     switch (method) {
       case 'AMethod': return this.aMethod(ctx, request);
       case 'AnotherMethod': return this.anotherMethod(ctx, request);
-      default: throw new ArgumentError('Unknown method: $method');
+      default: throw new $core.ArgumentError('Unknown method: $method');
     }
   }
 
-  Map<String, dynamic> get $json => TestServiceBase$json;
-  Map<String, Map<String, dynamic>> get $messageJson => TestServiceBase$messageJson;
+  $core.Map<$core.String, $core.dynamic> get $json => TestServiceBase$json;
+  $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => TestServiceBase$messageJson;
 }
 
diff --git a/protoc_plugin/test/goldens/serviceGenerator.pb.json b/protoc_plugin/test/goldens/serviceGenerator.pb.json
index 96cdc7a..cd9db71 100644
--- a/protoc_plugin/test/goldens/serviceGenerator.pb.json
+++ b/protoc_plugin/test/goldens/serviceGenerator.pb.json
@@ -2,7 +2,7 @@
 //  Generated code. Do not modify.
 //  source: testpkg.proto
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 import 'foobar.pbjson.dart' as $0;
 
diff --git a/protoc_plugin/test/goldens/topLevelEnum.pb b/protoc_plugin/test/goldens/topLevelEnum.pb
index bb968a8..c2cbf7d 100644
--- a/protoc_plugin/test/goldens/topLevelEnum.pb
+++ b/protoc_plugin/test/goldens/topLevelEnum.pb
@@ -2,10 +2,10 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
+import 'dart:core' as $core show int, bool, double, String, List, Map, override;
 
 export 'test.pbenum.dart';
 
diff --git a/protoc_plugin/test/goldens/topLevelEnum.pbenum b/protoc_plugin/test/goldens/topLevelEnum.pbenum
index 6026295..578e49b 100644
--- a/protoc_plugin/test/goldens/topLevelEnum.pbenum
+++ b/protoc_plugin/test/goldens/topLevelEnum.pbenum
@@ -2,10 +2,10 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 // ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME
-import 'dart:core' show int, dynamic, String, List, Map;
+import 'dart:core' as $core show int, dynamic, String, List, Map;
 import 'package:protobuf/protobuf.dart' as $pb;
 
 class PhoneType extends $pb.ProtobufEnum {
@@ -15,15 +15,15 @@
 
   static const PhoneType BUSINESS = WORK;
 
-  static const List<PhoneType> values = const <PhoneType> [
+  static const $core.List<PhoneType> values = const <PhoneType> [
     MOBILE,
     HOME,
     WORK,
   ];
 
-  static final Map<int, PhoneType> _byValue = $pb.ProtobufEnum.initByValue(values);
-  static PhoneType valueOf(int value) => _byValue[value];
+  static final $core.Map<$core.int, PhoneType> _byValue = $pb.ProtobufEnum.initByValue(values);
+  static PhoneType valueOf($core.int value) => _byValue[value];
 
-  const PhoneType._(int v, String n) : super(v, n);
+  const PhoneType._($core.int v, $core.String n) : super(v, n);
 }
 
diff --git a/protoc_plugin/test/goldens/topLevelEnum.pbenum.meta b/protoc_plugin/test/goldens/topLevelEnum.pbenum.meta
index 9fc500e..02d09e0 100644
--- a/protoc_plugin/test/goldens/topLevelEnum.pbenum.meta
+++ b/protoc_plugin/test/goldens/topLevelEnum.pbenum.meta
@@ -3,8 +3,8 @@
   path: 0
   path: 1
   sourceFile: test
-  begin: 313
-  end: 322
+  begin: 339
+  end: 348
 }
 annotation: {
   path: 5
@@ -13,8 +13,8 @@
   path: 0
   path: 1
   sourceFile: test
-  begin: 373
-  end: 379
+  begin: 399
+  end: 405
 }
 annotation: {
   path: 5
@@ -23,8 +23,8 @@
   path: 1
   path: 1
   sourceFile: test
-  begin: 439
-  end: 443
+  begin: 465
+  end: 469
 }
 annotation: {
   path: 5
@@ -33,8 +33,8 @@
   path: 2
   path: 1
   sourceFile: test
-  begin: 501
-  end: 505
+  begin: 527
+  end: 531
 }
 annotation: {
   path: 5
@@ -43,6 +43,6 @@
   path: 3
   path: 1
   sourceFile: test
-  begin: 564
-  end: 572
+  begin: 590
+  end: 598
 }
diff --git a/protoc_plugin/test/goldens/topLevelEnum.pbjson b/protoc_plugin/test/goldens/topLevelEnum.pbjson
index 56520fd..430c959 100644
--- a/protoc_plugin/test/goldens/topLevelEnum.pbjson
+++ b/protoc_plugin/test/goldens/topLevelEnum.pbjson
@@ -2,7 +2,7 @@
 //  Generated code. Do not modify.
 //  source: test
 ///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import
 
 const PhoneType$json = const {
   '1': 'PhoneType',