Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: lib/src/descriptor.pb.dart

Issue 1829573002: Fix all strong mode warnings in protoc-plugin (Closed) Base URL: git@github.com:dart-lang/dart-protoc-plugin.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/src/descriptor.pb.dart
diff --git a/lib/src/descriptor.pb.dart b/lib/src/descriptor.pb.dart
index 946e2f9101dbb6e4c79784981cd51c7102981d4a..802cc28ad9fc67d54f58bc1bad49ebb388fa795b 100644
--- a/lib/src/descriptor.pb.dart
+++ b/lib/src/descriptor.pb.dart
@@ -27,7 +27,7 @@ class FileDescriptorSet extends GeneratedMessage {
if (v is !FileDescriptorSet) checkItemFailed(v, 'FileDescriptorSet');
}
- List<FileDescriptorProto> get file => getField(1);
+ List<FileDescriptorProto> get file => $_get(0, 1, null) as List<FileDescriptorProto>;
vsm 2016/03/23 17:20:24 This is going to be problematic at runtime if $_ge
skybrian 2016/03/23 18:02:39 It's going to be trickier than that. Ultimately th
Leaf 2016/03/23 18:09:59 We don't support generic getters and setters. Int
skybrian 2016/03/23 18:34:17 I don't know what you mean by that? _get isn't a g
skybrian 2016/04/01 02:00:15 $_get() is now a generic method. At runtime the l
}
class _ReadonlyFileDescriptorSet extends FileDescriptorSet with ReadonlyMessageMixin {}
@@ -37,14 +37,14 @@ class FileDescriptorProto extends GeneratedMessage {
..a(1, 'name', PbFieldType.OS)
..a(2, 'package', PbFieldType.OS)
..p(3, 'dependency', PbFieldType.PS)
- ..p(10, 'publicDependency', PbFieldType.P3)
- ..p(11, 'weakDependency', PbFieldType.P3)
..pp(4, 'messageType', PbFieldType.PM, DescriptorProto.$checkItem, DescriptorProto.create)
..pp(5, 'enumType', PbFieldType.PM, EnumDescriptorProto.$checkItem, EnumDescriptorProto.create)
..pp(6, 'service', PbFieldType.PM, ServiceDescriptorProto.$checkItem, ServiceDescriptorProto.create)
..pp(7, 'extension', PbFieldType.PM, FieldDescriptorProto.$checkItem, FieldDescriptorProto.create)
..a(8, 'options', PbFieldType.OM, FileOptions.getDefault, FileOptions.create)
..a(9, 'sourceCodeInfo', PbFieldType.OM, SourceCodeInfo.getDefault, SourceCodeInfo.create)
+ ..p(10, 'publicDependency', PbFieldType.P3)
+ ..p(11, 'weakDependency', PbFieldType.P3)
;
FileDescriptorProto() : super();
@@ -63,39 +63,39 @@ class FileDescriptorProto extends GeneratedMessage {
if (v is !FileDescriptorProto) checkItemFailed(v, 'FileDescriptorProto');
}
- String get name => getField(1);
- void set name(String v) { setField(1, v); }
- bool hasName() => hasField(1);
+ String get name => $_get(0, 1, '') as String;
+ void set name(String v) { $_setString(0, 1, v); }
+ bool hasName() => $_has(0, 1);
void clearName() => clearField(1);
- String get package => getField(2);
- void set package(String v) { setField(2, v); }
- bool hasPackage() => hasField(2);
+ String get package => $_get(1, 2, '') as String;
+ void set package(String v) { $_setString(1, 2, v); }
+ bool hasPackage() => $_has(1, 2);
void clearPackage() => clearField(2);
- List<String> get dependency => getField(3);
+ List<String> get dependency => $_get(2, 3, null) as List<String>;
vsm 2016/03/23 17:20:24 ditto here and the other List casts below
- List<int> get publicDependency => getField(10);
+ List<DescriptorProto> get messageType => $_get(3, 4, null) as List<DescriptorProto>;
- List<int> get weakDependency => getField(11);
+ List<EnumDescriptorProto> get enumType => $_get(4, 5, null) as List<EnumDescriptorProto>;
- List<DescriptorProto> get messageType => getField(4);
+ List<ServiceDescriptorProto> get service => $_get(5, 6, null) as List<ServiceDescriptorProto>;
- List<EnumDescriptorProto> get enumType => getField(5);
+ List<FieldDescriptorProto> get extension => $_get(6, 7, null) as List<FieldDescriptorProto>;
- List<ServiceDescriptorProto> get service => getField(6);
-
- List<FieldDescriptorProto> get extension => getField(7);
-
- FileOptions get options => getField(8);
+ FileOptions get options => $_get(7, 8, null) as FileOptions;
void set options(FileOptions v) { setField(8, v); }
- bool hasOptions() => hasField(8);
+ bool hasOptions() => $_has(7, 8);
void clearOptions() => clearField(8);
- SourceCodeInfo get sourceCodeInfo => getField(9);
+ SourceCodeInfo get sourceCodeInfo => $_get(8, 9, null) as SourceCodeInfo;
void set sourceCodeInfo(SourceCodeInfo v) { setField(9, v); }
- bool hasSourceCodeInfo() => hasField(9);
+ bool hasSourceCodeInfo() => $_has(8, 9);
void clearSourceCodeInfo() => clearField(9);
+
+ List<int> get publicDependency => $_get(9, 10, null) as List<int>;
+
+ List<int> get weakDependency => $_get(10, 11, null) as List<int>;
}
class _ReadonlyFileDescriptorProto extends FileDescriptorProto with ReadonlyMessageMixin {}
@@ -123,14 +123,14 @@ class DescriptorProto_ExtensionRange extends GeneratedMessage {
if (v is !DescriptorProto_ExtensionRange) checkItemFailed(v, 'DescriptorProto_ExtensionRange');
}
- int get start => getField(1);
- void set start(int v) { setField(1, v); }
- bool hasStart() => hasField(1);
+ int get start => $_get(0, 1, 0) as int;
+ void set start(int v) { $_setUnsignedInt32(0, 1, v); }
+ bool hasStart() => $_has(0, 1);
void clearStart() => clearField(1);
- int get end => getField(2);
- void set end(int v) { setField(2, v); }
- bool hasEnd() => hasField(2);
+ int get end => $_get(1, 2, 0) as int;
+ void set end(int v) { $_setUnsignedInt32(1, 2, v); }
+ bool hasEnd() => $_has(1, 2);
void clearEnd() => clearField(2);
}
@@ -140,10 +140,10 @@ class DescriptorProto extends GeneratedMessage {
static final BuilderInfo _i = new BuilderInfo('DescriptorProto')
..a(1, 'name', PbFieldType.OS)
..pp(2, 'field', PbFieldType.PM, FieldDescriptorProto.$checkItem, FieldDescriptorProto.create)
- ..pp(6, 'extension', PbFieldType.PM, FieldDescriptorProto.$checkItem, FieldDescriptorProto.create)
..pp(3, 'nestedType', PbFieldType.PM, DescriptorProto.$checkItem, DescriptorProto.create)
..pp(4, 'enumType', PbFieldType.PM, EnumDescriptorProto.$checkItem, EnumDescriptorProto.create)
..pp(5, 'extensionRange', PbFieldType.PM, DescriptorProto_ExtensionRange.$checkItem, DescriptorProto_ExtensionRange.create)
+ ..pp(6, 'extension', PbFieldType.PM, FieldDescriptorProto.$checkItem, FieldDescriptorProto.create)
..a(7, 'options', PbFieldType.OM, MessageOptions.getDefault, MessageOptions.create)
;
@@ -163,24 +163,24 @@ class DescriptorProto extends GeneratedMessage {
if (v is !DescriptorProto) checkItemFailed(v, 'DescriptorProto');
}
- String get name => getField(1);
- void set name(String v) { setField(1, v); }
- bool hasName() => hasField(1);
+ String get name => $_get(0, 1, '') as String;
+ void set name(String v) { $_setString(0, 1, v); }
+ bool hasName() => $_has(0, 1);
void clearName() => clearField(1);
- List<FieldDescriptorProto> get field => getField(2);
+ List<FieldDescriptorProto> get field => $_get(1, 2, null) as List<FieldDescriptorProto>;
- List<FieldDescriptorProto> get extension => getField(6);
+ List<DescriptorProto> get nestedType => $_get(2, 3, null) as List<DescriptorProto>;
- List<DescriptorProto> get nestedType => getField(3);
+ List<EnumDescriptorProto> get enumType => $_get(3, 4, null) as List<EnumDescriptorProto>;
- List<EnumDescriptorProto> get enumType => getField(4);
+ List<DescriptorProto_ExtensionRange> get extensionRange => $_get(4, 5, null) as List<DescriptorProto_ExtensionRange>;
- List<DescriptorProto_ExtensionRange> get extensionRange => getField(5);
+ List<FieldDescriptorProto> get extension => $_get(5, 6, null) as List<FieldDescriptorProto>;
- MessageOptions get options => getField(7);
+ MessageOptions get options => $_get(6, 7, null) as MessageOptions;
void set options(MessageOptions v) { setField(7, v); }
- bool hasOptions() => hasField(7);
+ bool hasOptions() => $_has(6, 7);
void clearOptions() => clearField(7);
}
@@ -227,8 +227,8 @@ class FieldDescriptorProto_Type extends ProtobufEnum {
TYPE_SINT64,
];
- static final Map<int, FieldDescriptorProto_Type> _byValue = ProtobufEnum.initByValue(values);
- static FieldDescriptorProto_Type valueOf(int value) => _byValue[value];
+ static final Map<int, dynamic> _byValue = ProtobufEnum.initByValue(values);
+ static FieldDescriptorProto_Type valueOf(int value) => _byValue[value] as FieldDescriptorProto_Type;
static void $checkItem(FieldDescriptorProto_Type v) {
if (v is !FieldDescriptorProto_Type) checkItemFailed(v, 'FieldDescriptorProto_Type');
}
@@ -247,8 +247,8 @@ class FieldDescriptorProto_Label extends ProtobufEnum {
LABEL_REPEATED,
];
- static final Map<int, FieldDescriptorProto_Label> _byValue = ProtobufEnum.initByValue(values);
- static FieldDescriptorProto_Label valueOf(int value) => _byValue[value];
+ static final Map<int, dynamic> _byValue = ProtobufEnum.initByValue(values);
+ static FieldDescriptorProto_Label valueOf(int value) => _byValue[value] as FieldDescriptorProto_Label;
static void $checkItem(FieldDescriptorProto_Label v) {
if (v is !FieldDescriptorProto_Label) checkItemFailed(v, 'FieldDescriptorProto_Label');
}
@@ -259,11 +259,11 @@ class FieldDescriptorProto_Label extends ProtobufEnum {
class FieldDescriptorProto extends GeneratedMessage {
static final BuilderInfo _i = new BuilderInfo('FieldDescriptorProto')
..a(1, 'name', PbFieldType.OS)
+ ..a(2, 'extendee', PbFieldType.OS)
..a(3, 'number', PbFieldType.O3)
..e(4, 'label', PbFieldType.OE, FieldDescriptorProto_Label.LABEL_OPTIONAL, FieldDescriptorProto_Label.valueOf)
..e(5, 'type', PbFieldType.OE, FieldDescriptorProto_Type.TYPE_DOUBLE, FieldDescriptorProto_Type.valueOf)
..a(6, 'typeName', PbFieldType.OS)
- ..a(2, 'extendee', PbFieldType.OS)
..a(7, 'defaultValue', PbFieldType.OS)
..a(8, 'options', PbFieldType.OM, FieldOptions.getDefault, FieldOptions.create)
;
@@ -284,44 +284,44 @@ class FieldDescriptorProto extends GeneratedMessage {
if (v is !FieldDescriptorProto) checkItemFailed(v, 'FieldDescriptorProto');
}
- String get name => getField(1);
- void set name(String v) { setField(1, v); }
- bool hasName() => hasField(1);
+ String get name => $_get(0, 1, '') as String;
+ void set name(String v) { $_setString(0, 1, v); }
+ bool hasName() => $_has(0, 1);
void clearName() => clearField(1);
- int get number => getField(3);
- void set number(int v) { setField(3, v); }
- bool hasNumber() => hasField(3);
+ String get extendee => $_get(1, 2, '') as String;
+ void set extendee(String v) { $_setString(1, 2, v); }
+ bool hasExtendee() => $_has(1, 2);
+ void clearExtendee() => clearField(2);
+
+ int get number => $_get(2, 3, 0) as int;
+ void set number(int v) { $_setUnsignedInt32(2, 3, v); }
+ bool hasNumber() => $_has(2, 3);
void clearNumber() => clearField(3);
- FieldDescriptorProto_Label get label => getField(4);
+ FieldDescriptorProto_Label get label => $_get(3, 4, null) as FieldDescriptorProto_Label;
void set label(FieldDescriptorProto_Label v) { setField(4, v); }
- bool hasLabel() => hasField(4);
+ bool hasLabel() => $_has(3, 4);
void clearLabel() => clearField(4);
- FieldDescriptorProto_Type get type => getField(5);
+ FieldDescriptorProto_Type get type => $_get(4, 5, null) as FieldDescriptorProto_Type;
void set type(FieldDescriptorProto_Type v) { setField(5, v); }
- bool hasType() => hasField(5);
+ bool hasType() => $_has(4, 5);
void clearType() => clearField(5);
- String get typeName => getField(6);
- void set typeName(String v) { setField(6, v); }
- bool hasTypeName() => hasField(6);
+ String get typeName => $_get(5, 6, '') as String;
+ void set typeName(String v) { $_setString(5, 6, v); }
+ bool hasTypeName() => $_has(5, 6);
void clearTypeName() => clearField(6);
- String get extendee => getField(2);
- void set extendee(String v) { setField(2, v); }
- bool hasExtendee() => hasField(2);
- void clearExtendee() => clearField(2);
-
- String get defaultValue => getField(7);
- void set defaultValue(String v) { setField(7, v); }
- bool hasDefaultValue() => hasField(7);
+ String get defaultValue => $_get(6, 7, '') as String;
+ void set defaultValue(String v) { $_setString(6, 7, v); }
+ bool hasDefaultValue() => $_has(6, 7);
void clearDefaultValue() => clearField(7);
- FieldOptions get options => getField(8);
+ FieldOptions get options => $_get(7, 8, null) as FieldOptions;
void set options(FieldOptions v) { setField(8, v); }
- bool hasOptions() => hasField(8);
+ bool hasOptions() => $_has(7, 8);
void clearOptions() => clearField(8);
}
@@ -350,16 +350,16 @@ class EnumDescriptorProto extends GeneratedMessage {
if (v is !EnumDescriptorProto) checkItemFailed(v, 'EnumDescriptorProto');
}
- String get name => getField(1);
- void set name(String v) { setField(1, v); }
- bool hasName() => hasField(1);
+ String get name => $_get(0, 1, '') as String;
+ void set name(String v) { $_setString(0, 1, v); }
+ bool hasName() => $_has(0, 1);
void clearName() => clearField(1);
- List<EnumValueDescriptorProto> get value => getField(2);
+ List<EnumValueDescriptorProto> get value => $_get(1, 2, null) as List<EnumValueDescriptorProto>;
- EnumOptions get options => getField(3);
+ EnumOptions get options => $_get(2, 3, null) as EnumOptions;
void set options(EnumOptions v) { setField(3, v); }
- bool hasOptions() => hasField(3);
+ bool hasOptions() => $_has(2, 3);
void clearOptions() => clearField(3);
}
@@ -388,19 +388,19 @@ class EnumValueDescriptorProto extends GeneratedMessage {
if (v is !EnumValueDescriptorProto) checkItemFailed(v, 'EnumValueDescriptorProto');
}
- String get name => getField(1);
- void set name(String v) { setField(1, v); }
- bool hasName() => hasField(1);
+ String get name => $_get(0, 1, '') as String;
+ void set name(String v) { $_setString(0, 1, v); }
+ bool hasName() => $_has(0, 1);
void clearName() => clearField(1);
- int get number => getField(2);
- void set number(int v) { setField(2, v); }
- bool hasNumber() => hasField(2);
+ int get number => $_get(1, 2, 0) as int;
+ void set number(int v) { $_setUnsignedInt32(1, 2, v); }
+ bool hasNumber() => $_has(1, 2);
void clearNumber() => clearField(2);
- EnumValueOptions get options => getField(3);
+ EnumValueOptions get options => $_get(2, 3, null) as EnumValueOptions;
void set options(EnumValueOptions v) { setField(3, v); }
- bool hasOptions() => hasField(3);
+ bool hasOptions() => $_has(2, 3);
void clearOptions() => clearField(3);
}
@@ -410,8 +410,8 @@ class ServiceDescriptorProto extends GeneratedMessage {
static final BuilderInfo _i = new BuilderInfo('ServiceDescriptorProto')
..a(1, 'name', PbFieldType.OS)
..pp(2, 'method', PbFieldType.PM, MethodDescriptorProto.$checkItem, MethodDescriptorProto.create)
- ..pp(4, 'stream', PbFieldType.PM, StreamDescriptorProto.$checkItem, StreamDescriptorProto.create)
..a(3, 'options', PbFieldType.OM, ServiceOptions.getDefault, ServiceOptions.create)
+ ..pp(4, 'stream', PbFieldType.PM, StreamDescriptorProto.$checkItem, StreamDescriptorProto.create)
;
ServiceDescriptorProto() : super();
@@ -430,19 +430,19 @@ class ServiceDescriptorProto extends GeneratedMessage {
if (v is !ServiceDescriptorProto) checkItemFailed(v, 'ServiceDescriptorProto');
}
- String get name => getField(1);
- void set name(String v) { setField(1, v); }
- bool hasName() => hasField(1);
+ String get name => $_get(0, 1, '') as String;
+ void set name(String v) { $_setString(0, 1, v); }
+ bool hasName() => $_has(0, 1);
void clearName() => clearField(1);
- List<MethodDescriptorProto> get method => getField(2);
+ List<MethodDescriptorProto> get method => $_get(1, 2, null) as List<MethodDescriptorProto>;
- List<StreamDescriptorProto> get stream => getField(4);
-
- ServiceOptions get options => getField(3);
+ ServiceOptions get options => $_get(2, 3, null) as ServiceOptions;
void set options(ServiceOptions v) { setField(3, v); }
- bool hasOptions() => hasField(3);
+ bool hasOptions() => $_has(2, 3);
void clearOptions() => clearField(3);
+
+ List<StreamDescriptorProto> get stream => $_get(3, 4, null) as List<StreamDescriptorProto>;
}
class _ReadonlyServiceDescriptorProto extends ServiceDescriptorProto with ReadonlyMessageMixin {}
@@ -471,24 +471,24 @@ class MethodDescriptorProto extends GeneratedMessage {
if (v is !MethodDescriptorProto) checkItemFailed(v, 'MethodDescriptorProto');
}
- String get name => getField(1);
- void set name(String v) { setField(1, v); }
- bool hasName() => hasField(1);
+ String get name => $_get(0, 1, '') as String;
+ void set name(String v) { $_setString(0, 1, v); }
+ bool hasName() => $_has(0, 1);
void clearName() => clearField(1);
- String get inputType => getField(2);
- void set inputType(String v) { setField(2, v); }
- bool hasInputType() => hasField(2);
+ String get inputType => $_get(1, 2, '') as String;
+ void set inputType(String v) { $_setString(1, 2, v); }
+ bool hasInputType() => $_has(1, 2);
void clearInputType() => clearField(2);
- String get outputType => getField(3);
- void set outputType(String v) { setField(3, v); }
- bool hasOutputType() => hasField(3);
+ String get outputType => $_get(2, 3, '') as String;
+ void set outputType(String v) { $_setString(2, 3, v); }
+ bool hasOutputType() => $_has(2, 3);
void clearOutputType() => clearField(3);
- MethodOptions get options => getField(4);
+ MethodOptions get options => $_get(3, 4, null) as MethodOptions;
void set options(MethodOptions v) { setField(4, v); }
- bool hasOptions() => hasField(4);
+ bool hasOptions() => $_has(3, 4);
void clearOptions() => clearField(4);
}
@@ -518,24 +518,24 @@ class StreamDescriptorProto extends GeneratedMessage {
if (v is !StreamDescriptorProto) checkItemFailed(v, 'StreamDescriptorProto');
}
- String get name => getField(1);
- void set name(String v) { setField(1, v); }
- bool hasName() => hasField(1);
+ String get name => $_get(0, 1, '') as String;
+ void set name(String v) { $_setString(0, 1, v); }
+ bool hasName() => $_has(0, 1);
void clearName() => clearField(1);
- String get clientMessageType => getField(2);
- void set clientMessageType(String v) { setField(2, v); }
- bool hasClientMessageType() => hasField(2);
+ String get clientMessageType => $_get(1, 2, '') as String;
+ void set clientMessageType(String v) { $_setString(1, 2, v); }
+ bool hasClientMessageType() => $_has(1, 2);
void clearClientMessageType() => clearField(2);
- String get serverMessageType => getField(3);
- void set serverMessageType(String v) { setField(3, v); }
- bool hasServerMessageType() => hasField(3);
+ String get serverMessageType => $_get(2, 3, '') as String;
+ void set serverMessageType(String v) { $_setString(2, 3, v); }
+ bool hasServerMessageType() => $_has(2, 3);
void clearServerMessageType() => clearField(3);
- StreamOptions get options => getField(4);
+ StreamOptions get options => $_get(3, 4, null) as StreamOptions;
void set options(StreamOptions v) { setField(4, v); }
- bool hasOptions() => hasField(4);
+ bool hasOptions() => $_has(3, 4);
void clearOptions() => clearField(4);
}
@@ -552,8 +552,8 @@ class FileOptions_OptimizeMode extends ProtobufEnum {
LITE_RUNTIME,
];
- static final Map<int, FileOptions_OptimizeMode> _byValue = ProtobufEnum.initByValue(values);
- static FileOptions_OptimizeMode valueOf(int value) => _byValue[value];
+ static final Map<int, dynamic> _byValue = ProtobufEnum.initByValue(values);
+ static FileOptions_OptimizeMode valueOf(int value) => _byValue[value] as FileOptions_OptimizeMode;
static void $checkItem(FileOptions_OptimizeMode v) {
if (v is !FileOptions_OptimizeMode) checkItemFailed(v, 'FileOptions_OptimizeMode');
}
@@ -565,12 +565,12 @@ class FileOptions extends GeneratedMessage {
static final BuilderInfo _i = new BuilderInfo('FileOptions')
..a(1, 'javaPackage', PbFieldType.OS)
..a(8, 'javaOuterClassname', PbFieldType.OS)
- ..a(10, 'javaMultipleFiles', PbFieldType.OB)
- ..a(20, 'javaGenerateEqualsAndHash', PbFieldType.OB)
..e(9, 'optimizeFor', PbFieldType.OE, FileOptions_OptimizeMode.SPEED, FileOptions_OptimizeMode.valueOf)
+ ..a(10, 'javaMultipleFiles', PbFieldType.OB)
..a(16, 'ccGenericServices', PbFieldType.OB)
..a(17, 'javaGenericServices', PbFieldType.OB)
..a(18, 'pyGenericServices', PbFieldType.OB)
+ ..a(20, 'javaGenerateEqualsAndHash', PbFieldType.OB)
..pp(999, 'uninterpretedOption', PbFieldType.PM, UninterpretedOption.$checkItem, UninterpretedOption.create)
..hasExtensions = true
;
@@ -591,47 +591,47 @@ class FileOptions extends GeneratedMessage {
if (v is !FileOptions) checkItemFailed(v, 'FileOptions');
}
- String get javaPackage => getField(1);
- void set javaPackage(String v) { setField(1, v); }
- bool hasJavaPackage() => hasField(1);
+ String get javaPackage => $_get(0, 1, '') as String;
+ void set javaPackage(String v) { $_setString(0, 1, v); }
+ bool hasJavaPackage() => $_has(0, 1);
void clearJavaPackage() => clearField(1);
- String get javaOuterClassname => getField(8);
- void set javaOuterClassname(String v) { setField(8, v); }
- bool hasJavaOuterClassname() => hasField(8);
+ String get javaOuterClassname => $_get(1, 8, '') as String;
+ void set javaOuterClassname(String v) { $_setString(1, 8, v); }
+ bool hasJavaOuterClassname() => $_has(1, 8);
void clearJavaOuterClassname() => clearField(8);
- bool get javaMultipleFiles => getField(10);
- void set javaMultipleFiles(bool v) { setField(10, v); }
- bool hasJavaMultipleFiles() => hasField(10);
- void clearJavaMultipleFiles() => clearField(10);
-
- bool get javaGenerateEqualsAndHash => getField(20);
- void set javaGenerateEqualsAndHash(bool v) { setField(20, v); }
- bool hasJavaGenerateEqualsAndHash() => hasField(20);
- void clearJavaGenerateEqualsAndHash() => clearField(20);
-
- FileOptions_OptimizeMode get optimizeFor => getField(9);
+ FileOptions_OptimizeMode get optimizeFor => $_get(2, 9, null) as FileOptions_OptimizeMode;
void set optimizeFor(FileOptions_OptimizeMode v) { setField(9, v); }
- bool hasOptimizeFor() => hasField(9);
+ bool hasOptimizeFor() => $_has(2, 9);
void clearOptimizeFor() => clearField(9);
- bool get ccGenericServices => getField(16);
- void set ccGenericServices(bool v) { setField(16, v); }
- bool hasCcGenericServices() => hasField(16);
+ bool get javaMultipleFiles => $_get(3, 10, false) as bool;
+ void set javaMultipleFiles(bool v) { $_setBool(3, 10, v); }
+ bool hasJavaMultipleFiles() => $_has(3, 10);
+ void clearJavaMultipleFiles() => clearField(10);
+
+ bool get ccGenericServices => $_get(4, 16, false) as bool;
+ void set ccGenericServices(bool v) { $_setBool(4, 16, v); }
+ bool hasCcGenericServices() => $_has(4, 16);
void clearCcGenericServices() => clearField(16);
- bool get javaGenericServices => getField(17);
- void set javaGenericServices(bool v) { setField(17, v); }
- bool hasJavaGenericServices() => hasField(17);
+ bool get javaGenericServices => $_get(5, 17, false) as bool;
+ void set javaGenericServices(bool v) { $_setBool(5, 17, v); }
+ bool hasJavaGenericServices() => $_has(5, 17);
void clearJavaGenericServices() => clearField(17);
- bool get pyGenericServices => getField(18);
- void set pyGenericServices(bool v) { setField(18, v); }
- bool hasPyGenericServices() => hasField(18);
+ bool get pyGenericServices => $_get(6, 18, false) as bool;
+ void set pyGenericServices(bool v) { $_setBool(6, 18, v); }
+ bool hasPyGenericServices() => $_has(6, 18);
void clearPyGenericServices() => clearField(18);
- List<UninterpretedOption> get uninterpretedOption => getField(999);
+ bool get javaGenerateEqualsAndHash => $_get(7, 20, false) as bool;
+ void set javaGenerateEqualsAndHash(bool v) { $_setBool(7, 20, v); }
+ bool hasJavaGenerateEqualsAndHash() => $_has(7, 20);
+ void clearJavaGenerateEqualsAndHash() => clearField(20);
+
+ List<UninterpretedOption> get uninterpretedOption => $_get(8, 999, null) as List<UninterpretedOption>;
}
class _ReadonlyFileOptions extends FileOptions with ReadonlyMessageMixin {}
@@ -660,17 +660,17 @@ class MessageOptions extends GeneratedMessage {
if (v is !MessageOptions) checkItemFailed(v, 'MessageOptions');
}
- bool get messageSetWireFormat => getField(1);
- void set messageSetWireFormat(bool v) { setField(1, v); }
- bool hasMessageSetWireFormat() => hasField(1);
+ bool get messageSetWireFormat => $_get(0, 1, false) as bool;
+ void set messageSetWireFormat(bool v) { $_setBool(0, 1, v); }
+ bool hasMessageSetWireFormat() => $_has(0, 1);
void clearMessageSetWireFormat() => clearField(1);
- bool get noStandardDescriptorAccessor => getField(2);
- void set noStandardDescriptorAccessor(bool v) { setField(2, v); }
- bool hasNoStandardDescriptorAccessor() => hasField(2);
+ bool get noStandardDescriptorAccessor => $_get(1, 2, false) as bool;
+ void set noStandardDescriptorAccessor(bool v) { $_setBool(1, 2, v); }
+ bool hasNoStandardDescriptorAccessor() => $_has(1, 2);
void clearNoStandardDescriptorAccessor() => clearField(2);
- List<UninterpretedOption> get uninterpretedOption => getField(999);
+ List<UninterpretedOption> get uninterpretedOption => $_get(2, 999, null) as List<UninterpretedOption>;
}
class _ReadonlyMessageOptions extends MessageOptions with ReadonlyMessageMixin {}
@@ -682,8 +682,8 @@ class FieldOptions_CType extends ProtobufEnum {
STRING,
];
- static final Map<int, FieldOptions_CType> _byValue = ProtobufEnum.initByValue(values);
- static FieldOptions_CType valueOf(int value) => _byValue[value];
+ static final Map<int, dynamic> _byValue = ProtobufEnum.initByValue(values);
+ static FieldOptions_CType valueOf(int value) => _byValue[value] as FieldOptions_CType;
static void $checkItem(FieldOptions_CType v) {
if (v is !FieldOptions_CType) checkItemFailed(v, 'FieldOptions_CType');
}
@@ -695,8 +695,8 @@ class FieldOptions extends GeneratedMessage {
static final BuilderInfo _i = new BuilderInfo('FieldOptions')
..e(1, 'ctype', PbFieldType.OE, FieldOptions_CType.STRING, FieldOptions_CType.valueOf)
..a(2, 'packed', PbFieldType.OB)
- ..a(5, 'lazy', PbFieldType.OB)
..a(3, 'deprecated', PbFieldType.OB)
+ ..a(5, 'lazy', PbFieldType.OB)
..a(9, 'experimentalMapKey', PbFieldType.OS)
..pp(999, 'uninterpretedOption', PbFieldType.PM, UninterpretedOption.$checkItem, UninterpretedOption.create)
..hasExtensions = true
@@ -718,32 +718,32 @@ class FieldOptions extends GeneratedMessage {
if (v is !FieldOptions) checkItemFailed(v, 'FieldOptions');
}
- FieldOptions_CType get ctype => getField(1);
+ FieldOptions_CType get ctype => $_get(0, 1, null) as FieldOptions_CType;
void set ctype(FieldOptions_CType v) { setField(1, v); }
- bool hasCtype() => hasField(1);
+ bool hasCtype() => $_has(0, 1);
void clearCtype() => clearField(1);
- bool get packed => getField(2);
- void set packed(bool v) { setField(2, v); }
- bool hasPacked() => hasField(2);
+ bool get packed => $_get(1, 2, false) as bool;
+ void set packed(bool v) { $_setBool(1, 2, v); }
+ bool hasPacked() => $_has(1, 2);
void clearPacked() => clearField(2);
- bool get lazy => getField(5);
- void set lazy(bool v) { setField(5, v); }
- bool hasLazy() => hasField(5);
- void clearLazy() => clearField(5);
-
- bool get deprecated => getField(3);
- void set deprecated(bool v) { setField(3, v); }
- bool hasDeprecated() => hasField(3);
+ bool get deprecated => $_get(2, 3, false) as bool;
+ void set deprecated(bool v) { $_setBool(2, 3, v); }
+ bool hasDeprecated() => $_has(2, 3);
void clearDeprecated() => clearField(3);
- String get experimentalMapKey => getField(9);
- void set experimentalMapKey(String v) { setField(9, v); }
- bool hasExperimentalMapKey() => hasField(9);
+ bool get lazy => $_get(3, 5, false) as bool;
+ void set lazy(bool v) { $_setBool(3, 5, v); }
+ bool hasLazy() => $_has(3, 5);
+ void clearLazy() => clearField(5);
+
+ String get experimentalMapKey => $_get(4, 9, '') as String;
+ void set experimentalMapKey(String v) { $_setString(4, 9, v); }
+ bool hasExperimentalMapKey() => $_has(4, 9);
void clearExperimentalMapKey() => clearField(9);
- List<UninterpretedOption> get uninterpretedOption => getField(999);
+ List<UninterpretedOption> get uninterpretedOption => $_get(5, 999, null) as List<UninterpretedOption>;
}
class _ReadonlyFieldOptions extends FieldOptions with ReadonlyMessageMixin {}
@@ -771,12 +771,12 @@ class EnumOptions extends GeneratedMessage {
if (v is !EnumOptions) checkItemFailed(v, 'EnumOptions');
}
- bool get allowAlias => getField(2);
- void set allowAlias(bool v) { setField(2, v); }
- bool hasAllowAlias() => hasField(2);
+ bool get allowAlias => $_get(0, 2, true) as bool;
+ void set allowAlias(bool v) { $_setBool(0, 2, v); }
+ bool hasAllowAlias() => $_has(0, 2);
void clearAllowAlias() => clearField(2);
- List<UninterpretedOption> get uninterpretedOption => getField(999);
+ List<UninterpretedOption> get uninterpretedOption => $_get(1, 999, null) as List<UninterpretedOption>;
}
class _ReadonlyEnumOptions extends EnumOptions with ReadonlyMessageMixin {}
@@ -803,7 +803,7 @@ class EnumValueOptions extends GeneratedMessage {
if (v is !EnumValueOptions) checkItemFailed(v, 'EnumValueOptions');
}
- List<UninterpretedOption> get uninterpretedOption => getField(999);
+ List<UninterpretedOption> get uninterpretedOption => $_get(0, 999, null) as List<UninterpretedOption>;
}
class _ReadonlyEnumValueOptions extends EnumValueOptions with ReadonlyMessageMixin {}
@@ -830,7 +830,7 @@ class ServiceOptions extends GeneratedMessage {
if (v is !ServiceOptions) checkItemFailed(v, 'ServiceOptions');
}
- List<UninterpretedOption> get uninterpretedOption => getField(999);
+ List<UninterpretedOption> get uninterpretedOption => $_get(0, 999, null) as List<UninterpretedOption>;
}
class _ReadonlyServiceOptions extends ServiceOptions with ReadonlyMessageMixin {}
@@ -857,7 +857,7 @@ class MethodOptions extends GeneratedMessage {
if (v is !MethodOptions) checkItemFailed(v, 'MethodOptions');
}
- List<UninterpretedOption> get uninterpretedOption => getField(999);
+ List<UninterpretedOption> get uninterpretedOption => $_get(0, 999, null) as List<UninterpretedOption>;
}
class _ReadonlyMethodOptions extends MethodOptions with ReadonlyMessageMixin {}
@@ -884,7 +884,7 @@ class StreamOptions extends GeneratedMessage {
if (v is !StreamOptions) checkItemFailed(v, 'StreamOptions');
}
- List<UninterpretedOption> get uninterpretedOption => getField(999);
+ List<UninterpretedOption> get uninterpretedOption => $_get(0, 999, null) as List<UninterpretedOption>;
}
class _ReadonlyStreamOptions extends StreamOptions with ReadonlyMessageMixin {}
@@ -911,14 +911,14 @@ class UninterpretedOption_NamePart extends GeneratedMessage {
if (v is !UninterpretedOption_NamePart) checkItemFailed(v, 'UninterpretedOption_NamePart');
}
- String get namePart => getField(1);
- void set namePart(String v) { setField(1, v); }
- bool hasNamePart() => hasField(1);
+ String get namePart => $_get(0, 1, '') as String;
+ void set namePart(String v) { $_setString(0, 1, v); }
+ bool hasNamePart() => $_has(0, 1);
void clearNamePart() => clearField(1);
- bool get isExtension => getField(2);
- void set isExtension(bool v) { setField(2, v); }
- bool hasIsExtension() => hasField(2);
+ bool get isExtension => $_get(1, 2, false) as bool;
+ void set isExtension(bool v) { $_setBool(1, 2, v); }
+ bool hasIsExtension() => $_has(1, 2);
void clearIsExtension() => clearField(2);
}
@@ -951,36 +951,36 @@ class UninterpretedOption extends GeneratedMessage {
if (v is !UninterpretedOption) checkItemFailed(v, 'UninterpretedOption');
}
- List<UninterpretedOption_NamePart> get name => getField(2);
+ List<UninterpretedOption_NamePart> get name => $_get(0, 2, null) as List<UninterpretedOption_NamePart>;
- String get identifierValue => getField(3);
- void set identifierValue(String v) { setField(3, v); }
- bool hasIdentifierValue() => hasField(3);
+ String get identifierValue => $_get(1, 3, '') as String;
+ void set identifierValue(String v) { $_setString(1, 3, v); }
+ bool hasIdentifierValue() => $_has(1, 3);
void clearIdentifierValue() => clearField(3);
- Int64 get positiveIntValue => getField(4);
- void set positiveIntValue(Int64 v) { setField(4, v); }
- bool hasPositiveIntValue() => hasField(4);
+ Int64 get positiveIntValue => $_get(2, 4, null) as Int64;
+ void set positiveIntValue(Int64 v) { $_setInt64(2, 4, v); }
+ bool hasPositiveIntValue() => $_has(2, 4);
void clearPositiveIntValue() => clearField(4);
- Int64 get negativeIntValue => getField(5);
- void set negativeIntValue(Int64 v) { setField(5, v); }
- bool hasNegativeIntValue() => hasField(5);
+ Int64 get negativeIntValue => $_get(3, 5, null) as Int64;
+ void set negativeIntValue(Int64 v) { $_setInt64(3, 5, v); }
+ bool hasNegativeIntValue() => $_has(3, 5);
void clearNegativeIntValue() => clearField(5);
- double get doubleValue => getField(6);
- void set doubleValue(double v) { setField(6, v); }
- bool hasDoubleValue() => hasField(6);
+ double get doubleValue => $_get(4, 6, null) as double;
+ void set doubleValue(double v) { $_setDouble(4, 6, v); }
+ bool hasDoubleValue() => $_has(4, 6);
void clearDoubleValue() => clearField(6);
- List<int> get stringValue => getField(7);
- void set stringValue(List<int> v) { setField(7, v); }
- bool hasStringValue() => hasField(7);
+ List<int> get stringValue => $_get(5, 7, null) as List<int>;
+ void set stringValue(List<int> v) { $_setBytes(5, 7, v); }
+ bool hasStringValue() => $_has(5, 7);
void clearStringValue() => clearField(7);
- String get aggregateValue => getField(8);
- void set aggregateValue(String v) { setField(8, v); }
- bool hasAggregateValue() => hasField(8);
+ String get aggregateValue => $_get(6, 8, '') as String;
+ void set aggregateValue(String v) { $_setString(6, 8, v); }
+ bool hasAggregateValue() => $_has(6, 8);
void clearAggregateValue() => clearField(8);
}
@@ -1009,9 +1009,9 @@ class SourceCodeInfo_Location extends GeneratedMessage {
if (v is !SourceCodeInfo_Location) checkItemFailed(v, 'SourceCodeInfo_Location');
}
- List<int> get path => getField(1);
+ List<int> get path => $_get(0, 1, null) as List<int>;
- List<int> get span => getField(2);
+ List<int> get span => $_get(1, 2, null) as List<int>;
}
class _ReadonlySourceCodeInfo_Location extends SourceCodeInfo_Location with ReadonlyMessageMixin {}
@@ -1038,7 +1038,7 @@ class SourceCodeInfo extends GeneratedMessage {
if (v is !SourceCodeInfo) checkItemFailed(v, 'SourceCodeInfo');
}
- List<SourceCodeInfo_Location> get location => getField(1);
+ List<SourceCodeInfo_Location> get location => $_get(0, 1, null) as List<SourceCodeInfo_Location>;
}
class _ReadonlySourceCodeInfo extends SourceCodeInfo with ReadonlyMessageMixin {}
@@ -1101,38 +1101,39 @@ const FieldDescriptorProto$json = const {
const {'1': 'default_value', '3': 7, '4': 1, '5': 9},
const {'1': 'options', '3': 8, '4': 1, '5': 11, '6': '.proto2.FieldOptions'},
],
- '4': const [
- const {
- '1': 'Type',
- '2': const [
- const {'1': 'TYPE_DOUBLE', '2': 1},
- const {'1': 'TYPE_FLOAT', '2': 2},
- const {'1': 'TYPE_INT64', '2': 3},
- const {'1': 'TYPE_UINT64', '2': 4},
- const {'1': 'TYPE_INT32', '2': 5},
- const {'1': 'TYPE_FIXED64', '2': 6},
- const {'1': 'TYPE_FIXED32', '2': 7},
- const {'1': 'TYPE_BOOL', '2': 8},
- const {'1': 'TYPE_STRING', '2': 9},
- const {'1': 'TYPE_GROUP', '2': 10},
- const {'1': 'TYPE_MESSAGE', '2': 11},
- const {'1': 'TYPE_BYTES', '2': 12},
- const {'1': 'TYPE_UINT32', '2': 13},
- const {'1': 'TYPE_ENUM', '2': 14},
- const {'1': 'TYPE_SFIXED32', '2': 15},
- const {'1': 'TYPE_SFIXED64', '2': 16},
- const {'1': 'TYPE_SINT32', '2': 17},
- const {'1': 'TYPE_SINT64', '2': 18},
- ],
- },
- const {
- '1': 'Label',
- '2': const [
- const {'1': 'LABEL_OPTIONAL', '2': 1},
- const {'1': 'LABEL_REQUIRED', '2': 2},
- const {'1': 'LABEL_REPEATED', '2': 3},
- ],
- },
+ '4': const [FieldDescriptorProto_Type$json, FieldDescriptorProto_Label$json],
+};
+
+const FieldDescriptorProto_Type$json = const {
+ '1': 'Type',
+ '2': const [
+ const {'1': 'TYPE_DOUBLE', '2': 1},
+ const {'1': 'TYPE_FLOAT', '2': 2},
+ const {'1': 'TYPE_INT64', '2': 3},
+ const {'1': 'TYPE_UINT64', '2': 4},
+ const {'1': 'TYPE_INT32', '2': 5},
+ const {'1': 'TYPE_FIXED64', '2': 6},
+ const {'1': 'TYPE_FIXED32', '2': 7},
+ const {'1': 'TYPE_BOOL', '2': 8},
+ const {'1': 'TYPE_STRING', '2': 9},
+ const {'1': 'TYPE_GROUP', '2': 10},
+ const {'1': 'TYPE_MESSAGE', '2': 11},
+ const {'1': 'TYPE_BYTES', '2': 12},
+ const {'1': 'TYPE_UINT32', '2': 13},
+ const {'1': 'TYPE_ENUM', '2': 14},
+ const {'1': 'TYPE_SFIXED32', '2': 15},
+ const {'1': 'TYPE_SFIXED64', '2': 16},
+ const {'1': 'TYPE_SINT32', '2': 17},
+ const {'1': 'TYPE_SINT64', '2': 18},
+ ],
+};
+
+const FieldDescriptorProto_Label$json = const {
+ '1': 'Label',
+ '2': const [
+ const {'1': 'LABEL_OPTIONAL', '2': 1},
+ const {'1': 'LABEL_REQUIRED', '2': 2},
+ const {'1': 'LABEL_REPEATED', '2': 3},
],
};
@@ -1197,21 +1198,21 @@ const FileOptions$json = const {
const {'1': 'py_generic_services', '3': 18, '4': 1, '5': 8, '7': 'false'},
const {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.proto2.UninterpretedOption'},
],
- '4': const [
- const {
- '1': 'OptimizeMode',
- '2': const [
- const {'1': 'SPEED', '2': 1},
- const {'1': 'CODE_SIZE', '2': 2},
- const {'1': 'LITE_RUNTIME', '2': 3},
- ],
- },
- ],
+ '4': const [FileOptions_OptimizeMode$json],
'5': const [
const {'1': 1000, '2': 536870912},
],
};
+const FileOptions_OptimizeMode$json = const {
+ '1': 'OptimizeMode',
+ '2': const [
+ const {'1': 'SPEED', '2': 1},
+ const {'1': 'CODE_SIZE', '2': 2},
+ const {'1': 'LITE_RUNTIME', '2': 3},
+ ],
+};
+
const MessageOptions$json = const {
'1': 'MessageOptions',
'2': const [
@@ -1234,19 +1235,19 @@ const FieldOptions$json = const {
const {'1': 'experimental_map_key', '3': 9, '4': 1, '5': 9},
const {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.proto2.UninterpretedOption'},
],
- '4': const [
- const {
- '1': 'CType',
- '2': const [
- const {'1': 'STRING', '2': 0},
- ],
- },
- ],
+ '4': const [FieldOptions_CType$json],
'5': const [
const {'1': 1000, '2': 536870912},
],
};
+const FieldOptions_CType$json = const {
+ '1': 'CType',
+ '2': const [
+ const {'1': 'STRING', '2': 0},
+ ],
+};
+
const EnumOptions$json = const {
'1': 'EnumOptions',
'2': const [

Powered by Google App Engine
This is Rietveld 408576698