syntax = "proto3";

package city;

import "public_messages.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option csharp_namespace = "CMSMicroservice.Protobuf.Protos.City";

service CityContract
{
    rpc GetAllCitiesByFilter(GetAllCitiesByFilterRequest) returns (GetAllCitiesByFilterResponse){
        option (google.api.http) = {
            get: "/GetAllCitiesByFilter"
        };
    };
}

message GetAllCitiesByFilterRequest
{
    messages.PaginationState pagination_state = 1;
    google.protobuf.StringValue sort_by = 2;
    GetAllCitiesByFilterFilter filter = 3;
}

message GetAllCitiesByFilterFilter
{
    google.protobuf.Int64Value id = 1;
    google.protobuf.StringValue name = 2;
    google.protobuf.StringValue native = 3;
    google.protobuf.Int64Value state_id = 4;
}

message GetAllCitiesByFilterResponse
{
    messages.MetaData meta_data = 1;
    repeated GetAllCitiesByFilterResponseModel models = 2;
}

message GetAllCitiesByFilterResponseModel
{
    int64 id = 1;
    int64 external_id = 2;
    string name = 3;
    string native = 4;
    string latitude = 5;
    string longitude = 6;
    int64 state_id = 7;
    string state_name = 8;
    string state_native = 9;
}
