diff --git a/protoc_plugin/lib/src/gen/dart_options.pb.dart b/protoc_plugin/lib/src/gen/dart_options.pb.dart index b92dcb35..06435847 100644 --- a/protoc_plugin/lib/src/gen/dart_options.pb.dart +++ b/protoc_plugin/lib/src/gen/dart_options.pb.dart @@ -125,7 +125,7 @@ class Imports extends $pb.GeneratedMessage { _omitMessageNames ? '' : 'Imports', package: const $pb.PackageName(_omitMessageNames ? '' : 'dart_options'), createEmptyInstance: create) - ..pc(1, _omitFieldNames ? '' : 'mixins', $pb.PbFieldType.PM, + ..pPM(1, _omitFieldNames ? '' : 'mixins', subBuilder: DartMixin.create) ..hasRequiredFields = false; diff --git a/protoc_plugin/lib/src/gen/google/api/client.pb.dart b/protoc_plugin/lib/src/gen/google/api/client.pb.dart index fdf9cbe7..3cc4ee4b 100644 --- a/protoc_plugin/lib/src/gen/google/api/client.pb.dart +++ b/protoc_plugin/lib/src/gen/google/api/client.pb.dart @@ -162,10 +162,7 @@ class ClientLibrarySettings extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'version') - ..e<$1.LaunchStage>( - 2, _omitFieldNames ? '' : 'launchStage', $pb.PbFieldType.OE, - defaultOrMaker: $1.LaunchStage.LAUNCH_STAGE_UNSPECIFIED, - valueOf: $1.LaunchStage.valueOf, + ..aE<$1.LaunchStage>(2, _omitFieldNames ? '' : 'launchStage', enumValues: $1.LaunchStage.values) ..aOB(3, _omitFieldNames ? '' : 'restNumericEnums') ..aOM(21, _omitFieldNames ? '' : 'javaSettings', @@ -386,8 +383,7 @@ class Publishing extends $pb.GeneratedMessage { _omitMessageNames ? '' : 'Publishing', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) - ..pc( - 2, _omitFieldNames ? '' : 'methodSettings', $pb.PbFieldType.PM, + ..pPM(2, _omitFieldNames ? '' : 'methodSettings', subBuilder: MethodSettings.create) ..aOS(101, _omitFieldNames ? '' : 'newIssueUri') ..aOS(102, _omitFieldNames ? '' : 'documentationUri') @@ -395,14 +391,9 @@ class Publishing extends $pb.GeneratedMessage { ..aOS(104, _omitFieldNames ? '' : 'githubLabel') ..pPS(105, _omitFieldNames ? '' : 'codeownerGithubTeams') ..aOS(106, _omitFieldNames ? '' : 'docTagPrefix') - ..e( - 107, _omitFieldNames ? '' : 'organization', $pb.PbFieldType.OE, - defaultOrMaker: - ClientLibraryOrganization.CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED, - valueOf: ClientLibraryOrganization.valueOf, + ..aE(107, _omitFieldNames ? '' : 'organization', enumValues: ClientLibraryOrganization.values) - ..pc( - 109, _omitFieldNames ? '' : 'librarySettings', $pb.PbFieldType.PM, + ..pPM(109, _omitFieldNames ? '' : 'librarySettings', subBuilder: ClientLibrarySettings.create) ..aOS(110, _omitFieldNames ? '' : 'protoReferenceDocumentationUri') ..aOS(111, _omitFieldNames ? '' : 'restReferenceDocumentationUri') @@ -1310,8 +1301,8 @@ class MethodSettings_LongRunning extends $pb.GeneratedMessage { createEmptyInstance: create) ..aOM<$0.Duration>(1, _omitFieldNames ? '' : 'initialPollDelay', subBuilder: $0.Duration.create) - ..a<$core.double>( - 2, _omitFieldNames ? '' : 'pollDelayMultiplier', $pb.PbFieldType.OF) + ..aD(2, _omitFieldNames ? '' : 'pollDelayMultiplier', + fieldType: $pb.PbFieldType.OF) ..aOM<$0.Duration>(3, _omitFieldNames ? '' : 'maxPollDelay', subBuilder: $0.Duration.create) ..aOM<$0.Duration>(4, _omitFieldNames ? '' : 'totalPollTimeout', diff --git a/protoc_plugin/lib/src/gen/google/api/http.pb.dart b/protoc_plugin/lib/src/gen/google/api/http.pb.dart index 018fa1a0..a4964041 100644 --- a/protoc_plugin/lib/src/gen/google/api/http.pb.dart +++ b/protoc_plugin/lib/src/gen/google/api/http.pb.dart @@ -44,7 +44,7 @@ class Http extends $pb.GeneratedMessage { _omitMessageNames ? '' : 'Http', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) - ..pc(1, _omitFieldNames ? '' : 'rules', $pb.PbFieldType.PM, + ..pPM(1, _omitFieldNames ? '' : 'rules', subBuilder: HttpRule.create) ..aOB(2, _omitFieldNames ? '' : 'fullyDecodeReservedExpansion') ..hasRequiredFields = false; @@ -416,8 +416,7 @@ class HttpRule extends $pb.GeneratedMessage { ..aOS(7, _omitFieldNames ? '' : 'body') ..aOM(8, _omitFieldNames ? '' : 'custom', subBuilder: CustomHttpPattern.create) - ..pc( - 11, _omitFieldNames ? '' : 'additionalBindings', $pb.PbFieldType.PM, + ..pPM(11, _omitFieldNames ? '' : 'additionalBindings', subBuilder: HttpRule.create) ..aOS(12, _omitFieldNames ? '' : 'responseBody') ..hasRequiredFields = false; @@ -441,7 +440,19 @@ class HttpRule extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static HttpRule? _defaultInstance; + @$pb.TagNumber(2) + @$pb.TagNumber(3) + @$pb.TagNumber(4) + @$pb.TagNumber(5) + @$pb.TagNumber(6) + @$pb.TagNumber(8) HttpRule_Pattern whichPattern() => _HttpRule_PatternByTag[$_whichOneof(0)]!; + @$pb.TagNumber(2) + @$pb.TagNumber(3) + @$pb.TagNumber(4) + @$pb.TagNumber(5) + @$pb.TagNumber(6) + @$pb.TagNumber(8) void clearPattern() => $_clearField($_whichOneof(0)); /// Selects a method to which this rule applies. diff --git a/protoc_plugin/lib/src/gen/google/api/routing.pb.dart b/protoc_plugin/lib/src/gen/google/api/routing.pb.dart index 528ac007..28bb7421 100644 --- a/protoc_plugin/lib/src/gen/google/api/routing.pb.dart +++ b/protoc_plugin/lib/src/gen/google/api/routing.pb.dart @@ -398,8 +398,7 @@ class RoutingRule extends $pb.GeneratedMessage { _omitMessageNames ? '' : 'RoutingRule', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) - ..pc( - 2, _omitFieldNames ? '' : 'routingParameters', $pb.PbFieldType.PM, + ..pPM(2, _omitFieldNames ? '' : 'routingParameters', subBuilder: RoutingParameter.create) ..hasRequiredFields = false; diff --git a/protoc_plugin/lib/src/gen/google/protobuf/compiler/plugin.pb.dart b/protoc_plugin/lib/src/gen/google/protobuf/compiler/plugin.pb.dart index bbdcac1c..3bee3157 100644 --- a/protoc_plugin/lib/src/gen/google/protobuf/compiler/plugin.pb.dart +++ b/protoc_plugin/lib/src/gen/google/protobuf/compiler/plugin.pb.dart @@ -51,9 +51,9 @@ class Version extends $pb.GeneratedMessage { package: const $pb.PackageName( _omitMessageNames ? '' : 'google.protobuf.compiler'), createEmptyInstance: create) - ..a<$core.int>(1, _omitFieldNames ? '' : 'major', $pb.PbFieldType.O3) - ..a<$core.int>(2, _omitFieldNames ? '' : 'minor', $pb.PbFieldType.O3) - ..a<$core.int>(3, _omitFieldNames ? '' : 'patch', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'major') + ..aI(2, _omitFieldNames ? '' : 'minor') + ..aI(3, _omitFieldNames ? '' : 'patch') ..aOS(4, _omitFieldNames ? '' : 'suffix') ..hasRequiredFields = false; @@ -152,11 +152,10 @@ class CodeGeneratorRequest extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'parameter') ..aOM(3, _omitFieldNames ? '' : 'compilerVersion', subBuilder: Version.create) - ..pc<$0.FileDescriptorProto>( - 15, _omitFieldNames ? '' : 'protoFile', $pb.PbFieldType.PM, + ..pPM<$0.FileDescriptorProto>(15, _omitFieldNames ? '' : 'protoFile', subBuilder: $0.FileDescriptorProto.create) - ..pc<$0.FileDescriptorProto>( - 17, _omitFieldNames ? '' : 'sourceFileDescriptors', $pb.PbFieldType.PM, + ..pPM<$0.FileDescriptorProto>( + 17, _omitFieldNames ? '' : 'sourceFileDescriptors', subBuilder: $0.FileDescriptorProto.create); @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -424,12 +423,9 @@ class CodeGeneratorResponse extends $pb.GeneratedMessage { ..a<$fixnum.Int64>( 2, _omitFieldNames ? '' : 'supportedFeatures', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) - ..a<$core.int>( - 3, _omitFieldNames ? '' : 'minimumEdition', $pb.PbFieldType.O3) - ..a<$core.int>( - 4, _omitFieldNames ? '' : 'maximumEdition', $pb.PbFieldType.O3) - ..pc( - 15, _omitFieldNames ? '' : 'file', $pb.PbFieldType.PM, + ..aI(3, _omitFieldNames ? '' : 'minimumEdition') + ..aI(4, _omitFieldNames ? '' : 'maximumEdition') + ..pPM(15, _omitFieldNames ? '' : 'file', subBuilder: CodeGeneratorResponse_File.create) ..hasRequiredFields = false; diff --git a/protoc_plugin/lib/src/gen/google/protobuf/descriptor.pb.dart b/protoc_plugin/lib/src/gen/google/protobuf/descriptor.pb.dart index 4e051934..a4959473 100644 --- a/protoc_plugin/lib/src/gen/google/protobuf/descriptor.pb.dart +++ b/protoc_plugin/lib/src/gen/google/protobuf/descriptor.pb.dart @@ -46,8 +46,7 @@ class FileDescriptorSet extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..pc( - 1, _omitFieldNames ? '' : 'file', $pb.PbFieldType.PM, + ..pPM(1, _omitFieldNames ? '' : 'file', subBuilder: FileDescriptorProto.create) ..hasExtensions = true; @@ -131,17 +130,13 @@ class FileDescriptorProto extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'name') ..aOS(2, _omitFieldNames ? '' : 'package') ..pPS(3, _omitFieldNames ? '' : 'dependency') - ..pc( - 4, _omitFieldNames ? '' : 'messageType', $pb.PbFieldType.PM, + ..pPM(4, _omitFieldNames ? '' : 'messageType', subBuilder: DescriptorProto.create) - ..pc( - 5, _omitFieldNames ? '' : 'enumType', $pb.PbFieldType.PM, + ..pPM(5, _omitFieldNames ? '' : 'enumType', subBuilder: EnumDescriptorProto.create) - ..pc( - 6, _omitFieldNames ? '' : 'service', $pb.PbFieldType.PM, + ..pPM(6, _omitFieldNames ? '' : 'service', subBuilder: ServiceDescriptorProto.create) - ..pc( - 7, _omitFieldNames ? '' : 'extension', $pb.PbFieldType.PM, + ..pPM(7, _omitFieldNames ? '' : 'extension', subBuilder: FieldDescriptorProto.create) ..aOM(8, _omitFieldNames ? '' : 'options', subBuilder: FileOptions.create) @@ -152,9 +147,7 @@ class FileDescriptorProto extends $pb.GeneratedMessage { ..p<$core.int>( 11, _omitFieldNames ? '' : 'weakDependency', $pb.PbFieldType.P3) ..aOS(12, _omitFieldNames ? '' : 'syntax') - ..e(14, _omitFieldNames ? '' : 'edition', $pb.PbFieldType.OE, - defaultOrMaker: Edition.EDITION_UNKNOWN, - valueOf: Edition.valueOf, + ..aE(14, _omitFieldNames ? '' : 'edition', enumValues: Edition.values) ..pPS(15, _omitFieldNames ? '' : 'optionDependency'); @@ -311,8 +304,8 @@ class DescriptorProto_ExtensionRange extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..a<$core.int>(1, _omitFieldNames ? '' : 'start', $pb.PbFieldType.O3) - ..a<$core.int>(2, _omitFieldNames ? '' : 'end', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'start') + ..aI(2, _omitFieldNames ? '' : 'end') ..aOM(3, _omitFieldNames ? '' : 'options', subBuilder: ExtensionRangeOptions.create); @@ -398,8 +391,8 @@ class DescriptorProto_ReservedRange extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..a<$core.int>(1, _omitFieldNames ? '' : 'start', $pb.PbFieldType.O3) - ..a<$core.int>(2, _omitFieldNames ? '' : 'end', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'start') + ..aI(2, _omitFieldNames ? '' : 'end') ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -490,34 +483,26 @@ class DescriptorProto extends $pb.GeneratedMessage { const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'name') - ..pc( - 2, _omitFieldNames ? '' : 'field', $pb.PbFieldType.PM, + ..pPM(2, _omitFieldNames ? '' : 'field', subBuilder: FieldDescriptorProto.create) - ..pc( - 3, _omitFieldNames ? '' : 'nestedType', $pb.PbFieldType.PM, + ..pPM(3, _omitFieldNames ? '' : 'nestedType', subBuilder: DescriptorProto.create) - ..pc( - 4, _omitFieldNames ? '' : 'enumType', $pb.PbFieldType.PM, + ..pPM(4, _omitFieldNames ? '' : 'enumType', subBuilder: EnumDescriptorProto.create) - ..pc( - 5, _omitFieldNames ? '' : 'extensionRange', $pb.PbFieldType.PM, + ..pPM( + 5, _omitFieldNames ? '' : 'extensionRange', subBuilder: DescriptorProto_ExtensionRange.create) - ..pc( - 6, _omitFieldNames ? '' : 'extension', $pb.PbFieldType.PM, + ..pPM(6, _omitFieldNames ? '' : 'extension', subBuilder: FieldDescriptorProto.create) ..aOM(7, _omitFieldNames ? '' : 'options', subBuilder: MessageOptions.create) - ..pc( - 8, _omitFieldNames ? '' : 'oneofDecl', $pb.PbFieldType.PM, + ..pPM(8, _omitFieldNames ? '' : 'oneofDecl', subBuilder: OneofDescriptorProto.create) - ..pc( - 9, _omitFieldNames ? '' : 'reservedRange', $pb.PbFieldType.PM, + ..pPM( + 9, _omitFieldNames ? '' : 'reservedRange', subBuilder: DescriptorProto_ReservedRange.create) ..pPS(10, _omitFieldNames ? '' : 'reservedName') - ..e( - 11, _omitFieldNames ? '' : 'visibility', $pb.PbFieldType.OE, - defaultOrMaker: SymbolVisibility.VISIBILITY_UNSET, - valueOf: SymbolVisibility.valueOf, + ..aE(11, _omitFieldNames ? '' : 'visibility', enumValues: SymbolVisibility.values); @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -630,7 +615,7 @@ class ExtensionRangeOptions_Declaration extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..a<$core.int>(1, _omitFieldNames ? '' : 'number', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'number') ..aOS(2, _omitFieldNames ? '' : 'fullName') ..aOS(3, _omitFieldNames ? '' : 'type') ..aOB(5, _omitFieldNames ? '' : 'reserved') @@ -749,18 +734,17 @@ class ExtensionRangeOptions extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..pc( - 2, _omitFieldNames ? '' : 'declaration', $pb.PbFieldType.PM, + ..pPM( + 2, _omitFieldNames ? '' : 'declaration', subBuilder: ExtensionRangeOptions_Declaration.create) - ..e( - 3, _omitFieldNames ? '' : 'verification', $pb.PbFieldType.OE, + ..aE( + 3, _omitFieldNames ? '' : 'verification', defaultOrMaker: ExtensionRangeOptions_VerificationState.UNVERIFIED, - valueOf: ExtensionRangeOptions_VerificationState.valueOf, enumValues: ExtensionRangeOptions_VerificationState.values) ..aOM(50, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) - ..pc( - 999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, + ..pPM( + 999, _omitFieldNames ? '' : 'uninterpretedOption', subBuilder: UninterpretedOption.create) ..hasExtensions = true; @@ -868,22 +852,16 @@ class FieldDescriptorProto extends $pb.GeneratedMessage { createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'name') ..aOS(2, _omitFieldNames ? '' : 'extendee') - ..a<$core.int>(3, _omitFieldNames ? '' : 'number', $pb.PbFieldType.O3) - ..e( - 4, _omitFieldNames ? '' : 'label', $pb.PbFieldType.OE, - defaultOrMaker: FieldDescriptorProto_Label.LABEL_OPTIONAL, - valueOf: FieldDescriptorProto_Label.valueOf, + ..aI(3, _omitFieldNames ? '' : 'number') + ..aE(4, _omitFieldNames ? '' : 'label', enumValues: FieldDescriptorProto_Label.values) - ..e( - 5, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, - defaultOrMaker: FieldDescriptorProto_Type.TYPE_DOUBLE, - valueOf: FieldDescriptorProto_Type.valueOf, + ..aE(5, _omitFieldNames ? '' : 'type', enumValues: FieldDescriptorProto_Type.values) ..aOS(6, _omitFieldNames ? '' : 'typeName') ..aOS(7, _omitFieldNames ? '' : 'defaultValue') ..aOM(8, _omitFieldNames ? '' : 'options', subBuilder: FieldOptions.create) - ..a<$core.int>(9, _omitFieldNames ? '' : 'oneofIndex', $pb.PbFieldType.O3) + ..aI(9, _omitFieldNames ? '' : 'oneofIndex') ..aOS(10, _omitFieldNames ? '' : 'jsonName') ..aOB(17, _omitFieldNames ? '' : 'proto3Optional'); @@ -1154,8 +1132,8 @@ class EnumDescriptorProto_EnumReservedRange extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..a<$core.int>(1, _omitFieldNames ? '' : 'start', $pb.PbFieldType.O3) - ..a<$core.int>(2, _omitFieldNames ? '' : 'end', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'start') + ..aI(2, _omitFieldNames ? '' : 'end') ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -1237,19 +1215,15 @@ class EnumDescriptorProto extends $pb.GeneratedMessage { const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'name') - ..pc( - 2, _omitFieldNames ? '' : 'value', $pb.PbFieldType.PM, + ..pPM(2, _omitFieldNames ? '' : 'value', subBuilder: EnumValueDescriptorProto.create) ..aOM(3, _omitFieldNames ? '' : 'options', subBuilder: EnumOptions.create) - ..pc( - 4, _omitFieldNames ? '' : 'reservedRange', $pb.PbFieldType.PM, + ..pPM( + 4, _omitFieldNames ? '' : 'reservedRange', subBuilder: EnumDescriptorProto_EnumReservedRange.create) ..pPS(5, _omitFieldNames ? '' : 'reservedName') - ..e( - 6, _omitFieldNames ? '' : 'visibility', $pb.PbFieldType.OE, - defaultOrMaker: SymbolVisibility.VISIBILITY_UNSET, - valueOf: SymbolVisibility.valueOf, + ..aE(6, _omitFieldNames ? '' : 'visibility', enumValues: SymbolVisibility.values); @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -1348,7 +1322,7 @@ class EnumValueDescriptorProto extends $pb.GeneratedMessage { const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'name') - ..a<$core.int>(2, _omitFieldNames ? '' : 'number', $pb.PbFieldType.O3) + ..aI(2, _omitFieldNames ? '' : 'number') ..aOM(3, _omitFieldNames ? '' : 'options', subBuilder: EnumValueOptions.create); @@ -1433,8 +1407,7 @@ class ServiceDescriptorProto extends $pb.GeneratedMessage { const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'name') - ..pc( - 2, _omitFieldNames ? '' : 'method', $pb.PbFieldType.PM, + ..pPM(2, _omitFieldNames ? '' : 'method', subBuilder: MethodDescriptorProto.create) ..aOM(3, _omitFieldNames ? '' : 'options', subBuilder: ServiceOptions.create); @@ -1682,10 +1655,8 @@ class FileOptions extends $pb.GeneratedMessage { createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'javaPackage') ..aOS(8, _omitFieldNames ? '' : 'javaOuterClassname') - ..e( - 9, _omitFieldNames ? '' : 'optimizeFor', $pb.PbFieldType.OE, + ..aE(9, _omitFieldNames ? '' : 'optimizeFor', defaultOrMaker: FileOptions_OptimizeMode.SPEED, - valueOf: FileOptions_OptimizeMode.valueOf, enumValues: FileOptions_OptimizeMode.values) ..aOB(10, _omitFieldNames ? '' : 'javaMultipleFiles') ..aOS(11, _omitFieldNames ? '' : 'goPackage') @@ -1707,8 +1678,8 @@ class FileOptions extends $pb.GeneratedMessage { ..aOS(45, _omitFieldNames ? '' : 'rubyPackage') ..aOM(50, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) - ..pc( - 999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, + ..pPM( + 999, _omitFieldNames ? '' : 'uninterpretedOption', subBuilder: UninterpretedOption.create) ..hasExtensions = true; @@ -2041,8 +2012,8 @@ class MessageOptions extends $pb.GeneratedMessage { ..aOB(11, _omitFieldNames ? '' : 'deprecatedLegacyJsonFieldConflicts') ..aOM(12, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) - ..pc( - 999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, + ..pPM( + 999, _omitFieldNames ? '' : 'uninterpretedOption', subBuilder: UninterpretedOption.create) ..hasExtensions = true; @@ -2219,9 +2190,7 @@ class FieldOptions_EditionDefault extends $pb.GeneratedMessage { const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) ..aOS(2, _omitFieldNames ? '' : 'value') - ..e(3, _omitFieldNames ? '' : 'edition', $pb.PbFieldType.OE, - defaultOrMaker: Edition.EDITION_UNKNOWN, - valueOf: Edition.valueOf, + ..aE(3, _omitFieldNames ? '' : 'edition', enumValues: Edition.values) ..hasRequiredFields = false; @@ -2299,20 +2268,12 @@ class FieldOptions_FeatureSupport extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..e( - 1, _omitFieldNames ? '' : 'editionIntroduced', $pb.PbFieldType.OE, - defaultOrMaker: Edition.EDITION_UNKNOWN, - valueOf: Edition.valueOf, + ..aE(1, _omitFieldNames ? '' : 'editionIntroduced', enumValues: Edition.values) - ..e( - 2, _omitFieldNames ? '' : 'editionDeprecated', $pb.PbFieldType.OE, - defaultOrMaker: Edition.EDITION_UNKNOWN, - valueOf: Edition.valueOf, + ..aE(2, _omitFieldNames ? '' : 'editionDeprecated', enumValues: Edition.values) ..aOS(3, _omitFieldNames ? '' : 'deprecationWarning') - ..e(4, _omitFieldNames ? '' : 'editionRemoved', $pb.PbFieldType.OE, - defaultOrMaker: Edition.EDITION_UNKNOWN, - valueOf: Edition.valueOf, + ..aE(4, _omitFieldNames ? '' : 'editionRemoved', enumValues: Edition.values) ..hasRequiredFields = false; @@ -2394,7 +2355,7 @@ class FieldOptions extends $pb.GeneratedMessage { $core.bool? deprecated, $core.bool? lazy, FieldOptions_JSType? jstype, - $core.bool? weak, + @$core.Deprecated('This field is deprecated.') $core.bool? weak, $core.bool? unverifiedLazy, $core.bool? debugRedact, FieldOptions_OptionRetention? retention, @@ -2437,42 +2398,32 @@ class FieldOptions extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..e( - 1, _omitFieldNames ? '' : 'ctype', $pb.PbFieldType.OE, + ..aE(1, _omitFieldNames ? '' : 'ctype', defaultOrMaker: FieldOptions_CType.STRING, - valueOf: FieldOptions_CType.valueOf, enumValues: FieldOptions_CType.values) ..aOB(2, _omitFieldNames ? '' : 'packed') ..aOB(3, _omitFieldNames ? '' : 'deprecated') ..aOB(5, _omitFieldNames ? '' : 'lazy') - ..e( - 6, _omitFieldNames ? '' : 'jstype', $pb.PbFieldType.OE, + ..aE(6, _omitFieldNames ? '' : 'jstype', defaultOrMaker: FieldOptions_JSType.JS_NORMAL, - valueOf: FieldOptions_JSType.valueOf, enumValues: FieldOptions_JSType.values) ..aOB(10, _omitFieldNames ? '' : 'weak') ..aOB(15, _omitFieldNames ? '' : 'unverifiedLazy') ..aOB(16, _omitFieldNames ? '' : 'debugRedact') - ..e( - 17, _omitFieldNames ? '' : 'retention', $pb.PbFieldType.OE, - defaultOrMaker: FieldOptions_OptionRetention.RETENTION_UNKNOWN, - valueOf: FieldOptions_OptionRetention.valueOf, + ..aE(17, _omitFieldNames ? '' : 'retention', enumValues: FieldOptions_OptionRetention.values) - ..pc( - 19, _omitFieldNames ? '' : 'targets', $pb.PbFieldType.PE, - valueOf: FieldOptions_OptionTargetType.valueOf, - enumValues: FieldOptions_OptionTargetType.values, - defaultEnumValue: FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN) - ..pc( - 20, _omitFieldNames ? '' : 'editionDefaults', $pb.PbFieldType.PM, + ..pPE(19, _omitFieldNames ? '' : 'targets', + enumValues: FieldOptions_OptionTargetType.values) + ..pPM( + 20, _omitFieldNames ? '' : 'editionDefaults', subBuilder: FieldOptions_EditionDefault.create) ..aOM(21, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) ..aOM( 22, _omitFieldNames ? '' : 'featureSupport', subBuilder: FieldOptions_FeatureSupport.create) - ..pc( - 999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, + ..pPM( + 999, _omitFieldNames ? '' : 'uninterpretedOption', subBuilder: UninterpretedOption.create) ..hasExtensions = true; @@ -2593,13 +2544,18 @@ class FieldOptions extends $pb.GeneratedMessage { @$pb.TagNumber(6) void clearJstype() => $_clearField(6); + /// DEPRECATED. DO NOT USE! /// For Google-internal migration only. Do not use. + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(10) $core.bool get weak => $_getBF(5); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(10) set weak($core.bool value) => $_setBool(5, value); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(10) $core.bool hasWeak() => $_has(5); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(10) void clearWeak() => $_clearField(10); @@ -2701,8 +2657,8 @@ class OneofOptions extends $pb.GeneratedMessage { createEmptyInstance: create) ..aOM(1, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) - ..pc( - 999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, + ..pPM( + 999, _omitFieldNames ? '' : 'uninterpretedOption', subBuilder: UninterpretedOption.create) ..hasExtensions = true; @@ -2787,8 +2743,8 @@ class EnumOptions extends $pb.GeneratedMessage { ..aOB(6, _omitFieldNames ? '' : 'deprecatedLegacyJsonFieldConflicts') ..aOM(7, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) - ..pc( - 999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, + ..pPM( + 999, _omitFieldNames ? '' : 'uninterpretedOption', subBuilder: UninterpretedOption.create) ..hasExtensions = true; @@ -2915,8 +2871,8 @@ class EnumValueOptions extends $pb.GeneratedMessage { ..aOM( 4, _omitFieldNames ? '' : 'featureSupport', subBuilder: FieldOptions_FeatureSupport.create) - ..pc( - 999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, + ..pPM( + 999, _omitFieldNames ? '' : 'uninterpretedOption', subBuilder: UninterpretedOption.create) ..hasExtensions = true; @@ -3029,8 +2985,8 @@ class ServiceOptions extends $pb.GeneratedMessage { ..aOB(33, _omitFieldNames ? '' : 'deprecated') ..aOM(34, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) - ..pc( - 999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, + ..pPM( + 999, _omitFieldNames ? '' : 'uninterpretedOption', subBuilder: UninterpretedOption.create) ..hasExtensions = true; @@ -3119,15 +3075,14 @@ class MethodOptions extends $pb.GeneratedMessage { const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) ..aOB(33, _omitFieldNames ? '' : 'deprecated') - ..e( - 34, _omitFieldNames ? '' : 'idempotencyLevel', $pb.PbFieldType.OE, + ..aE( + 34, _omitFieldNames ? '' : 'idempotencyLevel', defaultOrMaker: MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN, - valueOf: MethodOptions_IdempotencyLevel.valueOf, enumValues: MethodOptions_IdempotencyLevel.values) ..aOM(35, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) - ..pc( - 999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, + ..pPM( + 999, _omitFieldNames ? '' : 'uninterpretedOption', subBuilder: UninterpretedOption.create) ..hasExtensions = true; @@ -3313,16 +3268,14 @@ class UninterpretedOption extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..pc( - 2, _omitFieldNames ? '' : 'name', $pb.PbFieldType.PM, + ..pPM(2, _omitFieldNames ? '' : 'name', subBuilder: UninterpretedOption_NamePart.create) ..aOS(3, _omitFieldNames ? '' : 'identifierValue') ..a<$fixnum.Int64>( 4, _omitFieldNames ? '' : 'positiveIntValue', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) ..aInt64(5, _omitFieldNames ? '' : 'negativeIntValue') - ..a<$core.double>( - 6, _omitFieldNames ? '' : 'doubleValue', $pb.PbFieldType.OD) + ..aD(6, _omitFieldNames ? '' : 'doubleValue') ..a<$core.List<$core.int>>( 7, _omitFieldNames ? '' : 'stringValue', $pb.PbFieldType.OY) ..aOS(8, _omitFieldNames ? '' : 'aggregateValue'); @@ -3499,48 +3452,25 @@ class FeatureSet extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..e( - 1, _omitFieldNames ? '' : 'fieldPresence', $pb.PbFieldType.OE, - defaultOrMaker: FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN, - valueOf: FeatureSet_FieldPresence.valueOf, + ..aE(1, _omitFieldNames ? '' : 'fieldPresence', enumValues: FeatureSet_FieldPresence.values) - ..e( - 2, _omitFieldNames ? '' : 'enumType', $pb.PbFieldType.OE, - defaultOrMaker: FeatureSet_EnumType.ENUM_TYPE_UNKNOWN, - valueOf: FeatureSet_EnumType.valueOf, + ..aE(2, _omitFieldNames ? '' : 'enumType', enumValues: FeatureSet_EnumType.values) - ..e( - 3, _omitFieldNames ? '' : 'repeatedFieldEncoding', $pb.PbFieldType.OE, - defaultOrMaker: - FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN, - valueOf: FeatureSet_RepeatedFieldEncoding.valueOf, + ..aE( + 3, _omitFieldNames ? '' : 'repeatedFieldEncoding', enumValues: FeatureSet_RepeatedFieldEncoding.values) - ..e( - 4, _omitFieldNames ? '' : 'utf8Validation', $pb.PbFieldType.OE, - defaultOrMaker: FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN, - valueOf: FeatureSet_Utf8Validation.valueOf, + ..aE(4, _omitFieldNames ? '' : 'utf8Validation', enumValues: FeatureSet_Utf8Validation.values) - ..e( - 5, _omitFieldNames ? '' : 'messageEncoding', $pb.PbFieldType.OE, - defaultOrMaker: FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN, - valueOf: FeatureSet_MessageEncoding.valueOf, + ..aE( + 5, _omitFieldNames ? '' : 'messageEncoding', enumValues: FeatureSet_MessageEncoding.values) - ..e( - 6, _omitFieldNames ? '' : 'jsonFormat', $pb.PbFieldType.OE, - defaultOrMaker: FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN, - valueOf: FeatureSet_JsonFormat.valueOf, + ..aE(6, _omitFieldNames ? '' : 'jsonFormat', enumValues: FeatureSet_JsonFormat.values) - ..e( - 7, _omitFieldNames ? '' : 'enforceNamingStyle', $pb.PbFieldType.OE, - defaultOrMaker: - FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN, - valueOf: FeatureSet_EnforceNamingStyle.valueOf, + ..aE( + 7, _omitFieldNames ? '' : 'enforceNamingStyle', enumValues: FeatureSet_EnforceNamingStyle.values) - ..e( - 8, _omitFieldNames ? '' : 'defaultSymbolVisibility', $pb.PbFieldType.OE, - defaultOrMaker: FeatureSet_VisibilityFeature_DefaultSymbolVisibility - .DEFAULT_SYMBOL_VISIBILITY_UNKNOWN, - valueOf: FeatureSet_VisibilityFeature_DefaultSymbolVisibility.valueOf, + ..aE( + 8, _omitFieldNames ? '' : 'defaultSymbolVisibility', enumValues: FeatureSet_VisibilityFeature_DefaultSymbolVisibility.values) ..hasExtensions = true; @@ -3675,9 +3605,7 @@ class FeatureSetDefaults_FeatureSetEditionDefault extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..e(3, _omitFieldNames ? '' : 'edition', $pb.PbFieldType.OE, - defaultOrMaker: Edition.EDITION_UNKNOWN, - valueOf: Edition.valueOf, + ..aE(3, _omitFieldNames ? '' : 'edition', enumValues: Edition.values) ..aOM(4, _omitFieldNames ? '' : 'overridableFeatures', subBuilder: FeatureSet.create) @@ -3775,16 +3703,12 @@ class FeatureSetDefaults extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..pc( - 1, _omitFieldNames ? '' : 'defaults', $pb.PbFieldType.PM, + ..pPM( + 1, _omitFieldNames ? '' : 'defaults', subBuilder: FeatureSetDefaults_FeatureSetEditionDefault.create) - ..e(4, _omitFieldNames ? '' : 'minimumEdition', $pb.PbFieldType.OE, - defaultOrMaker: Edition.EDITION_UNKNOWN, - valueOf: Edition.valueOf, + ..aE(4, _omitFieldNames ? '' : 'minimumEdition', enumValues: Edition.values) - ..e(5, _omitFieldNames ? '' : 'maximumEdition', $pb.PbFieldType.OE, - defaultOrMaker: Edition.EDITION_UNKNOWN, - valueOf: Edition.valueOf, + ..aE(5, _omitFieldNames ? '' : 'maximumEdition', enumValues: Edition.values); @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -4024,8 +3948,7 @@ class SourceCodeInfo extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..pc( - 1, _omitFieldNames ? '' : 'location', $pb.PbFieldType.PM, + ..pPM(1, _omitFieldNames ? '' : 'location', subBuilder: SourceCodeInfo_Location.create) ..hasExtensions = true; @@ -4130,12 +4053,10 @@ class GeneratedCodeInfo_Annotation extends $pb.GeneratedMessage { createEmptyInstance: create) ..p<$core.int>(1, _omitFieldNames ? '' : 'path', $pb.PbFieldType.K3) ..aOS(2, _omitFieldNames ? '' : 'sourceFile') - ..a<$core.int>(3, _omitFieldNames ? '' : 'begin', $pb.PbFieldType.O3) - ..a<$core.int>(4, _omitFieldNames ? '' : 'end', $pb.PbFieldType.O3) - ..e( - 5, _omitFieldNames ? '' : 'semantic', $pb.PbFieldType.OE, - defaultOrMaker: GeneratedCodeInfo_Annotation_Semantic.NONE, - valueOf: GeneratedCodeInfo_Annotation_Semantic.valueOf, + ..aI(3, _omitFieldNames ? '' : 'begin') + ..aI(4, _omitFieldNames ? '' : 'end') + ..aE( + 5, _omitFieldNames ? '' : 'semantic', enumValues: GeneratedCodeInfo_Annotation_Semantic.values) ..hasRequiredFields = false; @@ -4238,8 +4159,7 @@ class GeneratedCodeInfo extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) - ..pc( - 1, _omitFieldNames ? '' : 'annotation', $pb.PbFieldType.PM, + ..pPM(1, _omitFieldNames ? '' : 'annotation', subBuilder: GeneratedCodeInfo_Annotation.create) ..hasRequiredFields = false; diff --git a/protoc_plugin/lib/src/gen/google/protobuf/duration.pb.dart b/protoc_plugin/lib/src/gen/google/protobuf/duration.pb.dart index 343ec9dd..fafadb50 100644 --- a/protoc_plugin/lib/src/gen/google/protobuf/duration.pb.dart +++ b/protoc_plugin/lib/src/gen/google/protobuf/duration.pb.dart @@ -104,7 +104,7 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { createEmptyInstance: create, wellKnownType: $mixin.WellKnownType.duration) ..aInt64(1, _omitFieldNames ? '' : 'seconds') - ..a<$core.int>(2, _omitFieldNames ? '' : 'nanos', $pb.PbFieldType.O3) + ..aI(2, _omitFieldNames ? '' : 'nanos') ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') diff --git a/protoc_plugin/protos/google/protobuf/compiler/plugin.proto b/protoc_plugin/protos/google/protobuf/compiler/plugin.proto index 033fab23..10d285f8 100644 --- a/protoc_plugin/protos/google/protobuf/compiler/plugin.proto +++ b/protoc_plugin/protos/google/protobuf/compiler/plugin.proto @@ -24,11 +24,11 @@ package google.protobuf.compiler; option java_package = "com.google.protobuf.compiler"; option java_outer_classname = "PluginProtos"; +import "google/protobuf/descriptor.proto"; + option csharp_namespace = "Google.Protobuf.Compiler"; option go_package = "google.golang.org/protobuf/types/pluginpb"; -import "google/protobuf/descriptor.proto"; - // The version number of protocol compiler. message Version { optional int32 major = 1; diff --git a/protoc_plugin/protos/google/protobuf/descriptor.proto b/protoc_plugin/protos/google/protobuf/descriptor.proto index cb9bea19..333b7e99 100644 --- a/protoc_plugin/protos/google/protobuf/descriptor.proto +++ b/protoc_plugin/protos/google/protobuf/descriptor.proto @@ -398,6 +398,9 @@ message ServiceDescriptorProto { repeated MethodDescriptorProto method = 2; optional ServiceOptions options = 3; + + reserved 4; + reserved "stream"; } // Describes a method of a service. @@ -753,8 +756,9 @@ message FieldOptions { // is a formalization for deprecating fields. optional bool deprecated = 3 [default = false]; + // DEPRECATED. DO NOT USE! // For Google-internal migration only. Do not use. - optional bool weak = 10 [default = false]; + optional bool weak = 10 [default = false, deprecated = true]; // Indicate that the field value should not be printed out when using debug // formats, e.g. when the field contains sensitive credentials.