syntax = "proto3";

package userwallet;

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

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

service UserWalletContract
{
    rpc CreateNewUserWallet(CreateNewUserWalletRequest) returns (CreateNewUserWalletResponse){
        option (google.api.http) = {
            post: "/CreateNewUserWallet"
            body: "*"
        };
    };
    rpc UpdateUserWallet(UpdateUserWalletRequest) returns (google.protobuf.Empty){
        option (google.api.http) = {
            put: "/UpdateUserWallet"
            body: "*"
        };
    };
    rpc DeleteUserWallet(DeleteUserWalletRequest) returns (google.protobuf.Empty){
        option (google.api.http) = {
            delete: "/DeleteUserWallet"
            body: "*"
        };
    };
    rpc GetUserWallet(GetUserWalletRequest) returns (GetUserWalletResponse){
        option (google.api.http) = {
            get: "/GetUserWallet"
            
        };
    };
    rpc GetAllUserWalletByFilter(GetAllUserWalletByFilterRequest) returns (GetAllUserWalletByFilterResponse){
        option (google.api.http) = {
            get: "/GetAllUserWalletByFilter"
            
        };
    };
}
message CreateNewUserWalletRequest
{
    int64 user_id = 1;
    int64 balance = 2;
    int64 network_balance = 3;
}
message CreateNewUserWalletResponse
{
    int64 id = 1;
}
message UpdateUserWalletRequest
{
    int64 id = 1;
    int64 user_id = 2;
    int64 balance = 3;
    int64 network_balance = 4;
}
message DeleteUserWalletRequest
{
    int64 id = 1;
}
message GetUserWalletRequest
{
    int64 id = 1;
}
message GetUserWalletResponse
{
    int64 id = 1;
    int64 user_id = 2;
    int64 balance = 3;
    int64 network_balance = 4;
}
message GetAllUserWalletByFilterRequest
{
    messages.PaginationState pagination_state = 1;
    google.protobuf.StringValue sort_by = 2;
    GetAllUserWalletByFilterFilter filter = 3;
}
message GetAllUserWalletByFilterFilter
{
    google.protobuf.Int64Value id = 1;
    google.protobuf.Int64Value user_id = 2;
    google.protobuf.Int64Value balance = 3;
    google.protobuf.Int64Value network_balance = 4;
}
message GetAllUserWalletByFilterResponse
{
    messages.MetaData meta_data = 1;
    repeated GetAllUserWalletByFilterResponseModel models = 2;
}
message GetAllUserWalletByFilterResponseModel
{
    int64 id = 1;
    int64 user_id = 2;
    int64 balance = 3;
    int64 network_balance = 4;
}
