syntax = "proto3";

package example;

// User message definition
message User {
  string name = 1;
  int32 age = 2;
  repeated string emails = 3;
  Address address = 4;
}

message Address {
  string street = 1;
  string city = 2;
  string country = 3;
}

// Request and response for user service
message GetUserRequest {
  string user_id = 1;
}

message GetUserResponse {
  User user = 1;
}

enum Status {
  UNKNOWN = 0;
  ACTIVE = 1;
  INACTIVE = 2;
}

service UserService {
  rpc GetUser (GetUserRequest) returns (GetUserResponse);
  rpc ListUsers (ListUsersRequest) returns (stream User);
}

message ListUsersRequest {
  int32 page_size = 1;
  string page_token = 2;
}
