// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

syntax = "proto2";

package mixins;

import "dart_options.proto";

option (dart_options.imports) = {
  mixins: [{
    name: "Mixin1"
    import_from: "package:protoc_plugin/testing/mixins.dart"
  },
  {
    name: "Mixin2"
    import_from: "package:protoc_plugin/testing/mixins.dart"
  },
  {
    name: "Mixin3"
    import_from: "package:protoc_plugin/testing/mixins.dart"
    parent: "Mixin1"
  }];
};

option (dart_options.default_mixin) = "Mixin1";

message NoMixinPB {
  option (dart_options.mixin) = "";
}

message Mixin1PB {
  optional string interface_string = 1 [
    (dart_options.override_getter) = true,
    (dart_options.override_setter) = true,
    (dart_options.override_has_method) = true
  ];
}

message Mixin2PB {
  option (dart_options.mixin) = "Mixin2";

  optional string overridden_has_method = 3 [
    (dart_options.override_has_method) = true
  ];
}

message Mixin3PB {
  option (dart_options.mixin) = "Mixin3";

  optional string interface_string = 1 [
    (dart_options.override_getter) = true,
    (dart_options.override_setter) = true,
    (dart_options.override_has_method) = true
  ];
}
