syntax = "proto3";

package example.main;

import "google/protobuf/cpp_features.proto"; // unused import
import "types/existing_field.proto";

// This file tests that organize imports works for different scenarios:
// - Top-level message field
// - Nested message field
// - RPC method input type
// - RPC method output type
// - Custom option

// Test top-level field
message TestTopLevel {
  example.types.TopLevelField field = 1; // Missing import: toplevel_field.proto
  example.types.ExistingField imported = 2;
  example.types.NotFound not_found = 3; // Invalid import: ignore
}

// Test nested field
message TestNested {
  message Inner {
    example.types.NestedField field = 1; // Missing import: nested_field.proto
  }
}

// Test RPC method input and output
service TestService {
  rpc TestMethod(example.types.MethodInputType) returns (example.types.MethodOutputType);
  // Missing imports: method_input.proto and method_output.proto

  rpc TestGoogleTypes(google.protobuf.Empty) returns (google.protobuf.Timestamp);
  // Missing imports: google/protobuf/empty.proto and google/protobuf/timestamp.proto
}

// Test custom option
message TestOption {
  option (example.options.custom_option).value = "test_value"; // Missing import: custom_option.proto
  string value = 1;
}
