blob: 7de2170eb7133a287e5872e6e3e0f8c7ce701e22 [file] [log] [blame]
// Experimental options controlling Dart code generation.
syntax = "proto2";
package dart_options;
// This file must be modified for google internal use,
// because custom options only work when the package name
// agrees with the version of protoc we are using.
// (The import statement and "google.protobuf." prefix need to be changed.)
import "descriptor_2_5_opensource.proto";
// A mixin to be applied in the 'with' clause of a generated proto in dart.
message DartMixin {
// Class name of the mixin class.
optional string name = 1;
// File from which the mixin class is imported.
// The generated Dart code will use this in an import statement.
optional string import_from = 2;
// Used to apply multiple mixins to a proto.
// The mixin listed in parent will always be applied before this one,
// making the generated proto implement both mixins.
optional string parent = 3;
}
// Defines mixins imported from dart files to be used on messages in this file.
message ImportedMixins {
// The DartMixins to be imported.
repeated DartMixin mixins = 1;
}
extend google.protobuf.FileOptions {
// Defines the named mixins to be used on messages in this file.
// These mixins are in addition to internally defined mixins (e.g PbMapMixin)
// and may override them.
// Warning: there is no checking at compile time for name conflicts between
// identifiers defined in the mixin and proto-generated identifiers.
// Running dartanalyzer on the generated file might find some of them.
optional ImportedMixins imported_mixins = 28125061;
// Applies the named mixin to all messages in this file.
// (May be overridden by the "mixin" option on a message.)
// For now, "PbMapMixin" is the only available mixin.
optional string default_mixin = 96128839;
}
extend google.protobuf.MessageOptions {
// Applies the named mixin.
// For now, "PbMapMixin" is the only available mixin.
// The empty string can be used to turn off mixins for this message.
optional string mixin = 96128839;
}
extend google.protobuf.FieldOptions {
// Uses the given name for getters, setters and as suffixes for has/clear
// methods in the generated Dart file. Should be lowerCamelCase.
optional string dart_name = 28700919;
}