syntax = "proto3";
package sentinel.plan.v1;

option go_package = "github.com/sentinel-official/hub/x/plan/types";

import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
import "sentinel/types/v1/status.proto";

option (gogoproto.equal_all)           = false;
option (gogoproto.goproto_getters_all) = false;

// MsgAddRequest defines the SDK message for adding a plan
message MsgAddRequest {
  string frm                             = 1;
  repeated cosmos.base.v1beta1.Coin price = 2 [
    (gogoproto.nullable)     = false,
    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
  ];
  google.protobuf.Duration validity = 3
      [ (gogoproto.stdduration) = true, (gogoproto.nullable) = false ];
  string bytes = 4 [
    (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
    (gogoproto.nullable)   = false
  ];
}

// MsgSetStatusRequest defines the SDK message for modifying the status of a
// plan
message MsgSetStatusRequest {
  string frm                     = 1;
  uint64 id                       = 2;
  sentinel.types.v1.Status status = 3;
}

// MsgAddNodeRequest defines the SDK message for adding a node to a plan
message MsgAddNodeRequest {
  string frm    = 1;
  uint64 id      = 2;
  string address = 3;
}

// MsgRemoveNodeRequest defines the SDK message for removing a node frm a plan
message MsgRemoveNodeRequest {
  string frm    = 1;
  uint64 id      = 2;
  string address = 3;
}

// MsgAddResponse defines the response of message MsgRegisterRequest
message MsgAddResponse {}

// MsgSetStatusResponse defines the response of message MsgSetStatusRequest
message MsgSetStatusResponse {}

// MsgAddNodeResponse defines the response of message MsgAddNodeRequest
message MsgAddNodeResponse {}

// MsgRemoveNodeResponse defines the response of message MsgRemoveNodeRequest
message MsgRemoveNodeResponse {}

service MsgService {
  rpc MsgAdd(MsgAddRequest) returns (MsgAddResponse);
  rpc MsgSetStatus(MsgSetStatusRequest) returns (MsgSetStatusResponse);
  rpc MsgAddNode(MsgAddNodeRequest) returns (MsgAddNodeResponse);
  rpc MsgRemoveNode(MsgRemoveNodeRequest) returns (MsgRemoveNodeResponse);
}
