use milkyway_std_derive::CosmwasmExt;
/// Params defines the parameters for the module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.Params")]
pub struct Params {
    /// RewardsPlanCreationFee represents the fee that an account must pay in
    /// order to create a rewards plan.
    /// The fee is drawn from the MsgCreateRewardsPlan sender's account and
    /// transferred to the community pool.
    #[prost(message, repeated, tag = "1")]
    pub rewards_plan_creation_fee:
        ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
/// RewardsPlan represents a rewards allocation plan.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.RewardsPlan")]
pub struct RewardsPlan {
    /// ID is the unique identifier of the plan.
    #[prost(uint64, tag = "1")]
    #[serde(alias = "ID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub id: u64,
    /// Description is the description of the plan.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// ServiceID is the service ID which the plan is related to.
    #[prost(uint32, tag = "3")]
    #[serde(alias = "serviceID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub service_id: u32,
    /// AmountPerDay is the amount of rewards to be distributed, per day.
    /// The rewards amount for every block will be calculated based on this.
    #[prost(message, repeated, tag = "4")]
    pub amount_per_day: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
    /// StartTime is the starting time of the plan.
    #[prost(message, optional, tag = "5")]
    pub start_time: ::core::option::Option<crate::shim::Timestamp>,
    /// EndTime is the ending time of the plan.
    #[prost(message, optional, tag = "6")]
    pub end_time: ::core::option::Option<crate::shim::Timestamp>,
    /// RewardsPool is the address where rewards to be distributed are stored.
    /// If the rewards pool doesn't have enough funds to be distributed, then
    /// the rewards allocation for this plan will be skipped.
    #[prost(string, tag = "7")]
    pub rewards_pool: ::prost::alloc::string::String,
    /// PoolsDistribution is the rewards distribution parameters for pools.
    #[prost(message, optional, tag = "8")]
    pub pools_distribution: ::core::option::Option<Distribution>,
    /// OperatorsDistribution is the rewards distribution parameters for operators.
    #[prost(message, optional, tag = "9")]
    pub operators_distribution: ::core::option::Option<Distribution>,
    /// UsersDistribution is the rewards distribution parameters for users.
    #[prost(message, optional, tag = "10")]
    pub users_distribution: ::core::option::Option<UsersDistribution>,
}
/// Distribution represents distribution parameters for restaking
/// pools/operators.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.Distribution")]
pub struct Distribution {
    /// DelegationType is the type of delegation target which this distribution
    /// parameters are for. It can be one of DELEGATION_TYPE_POOL and
    /// DELEGATION_TYPE_OPERATOR.
    #[prost(enumeration = "super::super::restaking::v1::DelegationType", tag = "1")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub delegation_type: i32,
    /// Weight is the rewards distribution weight among other types of delegation
    /// targets.
    #[prost(uint32, tag = "2")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub weight: u32,
    /// Type is one of basic/weighted/egalitarian distributions.
    #[prost(message, optional, tag = "3")]
    pub r#type: ::core::option::Option<crate::shim::Any>,
}
/// DistributionTypeBasic represents the simplest form of distribution.
/// Rewards are allocated to entities based on their delegation values.
/// For example, if there are three operators with delegation values of
/// $1000, $1500, and $2000, their rewards will be distributed in a
/// 2:3:4 ratio.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.DistributionTypeBasic")]
pub struct DistributionTypeBasic {}
/// DistributionTypeWeighted is a type of distribution where the reward
/// weights for each entity are explicitly defined. Only the specified
/// delegation targets will receive rewards.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.DistributionTypeWeighted")]
pub struct DistributionTypeWeighted {
    #[prost(message, repeated, tag = "1")]
    pub weights: ::prost::alloc::vec::Vec<DistributionWeight>,
}
/// DistributionWeight defines a delegation target and its assigned weight.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.DistributionWeight")]
pub struct DistributionWeight {
    #[prost(uint32, tag = "1")]
    #[serde(alias = "delegation_targetID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub delegation_target_id: u32,
    #[prost(uint32, tag = "2")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub weight: u32,
}
/// DistributionTypeEgalitarian is a distribution method where all entities
/// receive an equal share of rewards(a.k.a. egalitarian method).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.DistributionTypeEgalitarian")]
pub struct DistributionTypeEgalitarian {}
/// Distribution represents distribution parameters for delegators who directly
/// staked their tokens to the service.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.UsersDistribution")]
pub struct UsersDistribution {
    /// Weight is the rewards distribution weight among other types of delegation
    /// targets.
    #[prost(uint32, tag = "1")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub weight: u32,
    /// Type defines the rewards distribution method. Currently only the basic
    /// distribution is allowed.
    #[prost(message, optional, tag = "2")]
    pub r#type: ::core::option::Option<crate::shim::Any>,
}
/// UsersDistributionTypeBasic represents the simplest form of distribution.
/// Rewards are allocated to entities based on their delegation values.
/// For example, if there are three users with delegation values of
/// $1000, $1500, and $2000, their rewards will be distributed in a
/// 2:3:4 ratio.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.UsersDistributionTypeBasic")]
pub struct UsersDistributionTypeBasic {}
/// HistoricalRewards represents historical rewards for a delegation target.
/// Height is implicit within the store key.
/// Cumulative reward ratio is the sum from the zeroeth period
/// until this period of rewards / tokens, per the spec.
/// The reference count indicates the number of objects
/// which might need to reference this historical entry at any point.
/// ReferenceCount =
///     number of outstanding delegations which ended the associated period (and
///     might need to read that record)
///   + number of slashes which ended the associated period (and might need to
///   read that record)
///   + one per validator for the zeroeth period, set on initialization
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.HistoricalRewards")]
pub struct HistoricalRewards {
    #[prost(message, repeated, tag = "1")]
    pub cumulative_reward_ratios: ::prost::alloc::vec::Vec<DecPool>,
    #[prost(uint32, tag = "2")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub reference_count: u32,
}
/// CurrentRewards represents current rewards and current
/// period for a delegation target kept as a running counter and incremented
/// each block as long as the delegation target's tokens remain constant.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.CurrentRewards")]
pub struct CurrentRewards {
    #[prost(message, repeated, tag = "1")]
    pub rewards: ::prost::alloc::vec::Vec<DecPool>,
    #[prost(uint64, tag = "2")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub period: u64,
}
/// OutstandingRewards represents outstanding (un-withdrawn) rewards
/// for a delegation target inexpensive to track, allows simple sanity checks.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.OutstandingRewards")]
pub struct OutstandingRewards {
    #[prost(message, repeated, tag = "1")]
    pub rewards: ::prost::alloc::vec::Vec<DecPool>,
}
/// AccumulatedCommission represents accumulated commission
/// for a delegation target kept as a running counter, can be withdrawn at any
/// time.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.AccumulatedCommission")]
pub struct AccumulatedCommission {
    #[prost(message, repeated, tag = "1")]
    pub commissions: ::prost::alloc::vec::Vec<DecPool>,
}
/// DelegatorStartingInfo represents the starting info for a delegator reward
/// period. It tracks the previous delegation target period, the delegation's
/// amount of staking token, and the creation height (to check later on if any
/// slashes have occurred). NOTE: Even though validators are slashed to whole
/// staking tokens, the delegators within the validator may be left with less
/// than a full token, thus sdk.Dec is used.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.DelegatorStartingInfo")]
pub struct DelegatorStartingInfo {
    #[prost(uint64, tag = "1")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub previous_period: u64,
    #[prost(message, repeated, tag = "2")]
    pub stakes: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::DecCoin>,
    #[prost(uint64, tag = "3")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub height: u64,
}
/// DelegationDelegatorReward represents the properties of a delegator's
/// delegation reward. The delegator address implicit in the within the
/// query request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.DelegationDelegatorReward")]
pub struct DelegationDelegatorReward {
    #[prost(enumeration = "super::super::restaking::v1::DelegationType", tag = "1")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub delegation_type: i32,
    #[prost(uint32, tag = "2")]
    #[serde(alias = "delegation_targetID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub delegation_target_id: u32,
    #[prost(message, repeated, tag = "3")]
    pub reward: ::prost::alloc::vec::Vec<DecPool>,
}
/// Pool is a Coins wrapper with denom which represents the rewards pool for the
/// given denom. It is used to represent the rewards associated with the denom.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.Pool")]
pub struct Pool {
    #[prost(string, tag = "1")]
    pub denom: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub coins: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
/// DecPool is a DecCoins wrapper with denom which represents the rewards pool
/// for the given denom. It is used to represent the rewards associated with the
/// denom.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.DecPool")]
pub struct DecPool {
    #[prost(string, tag = "1")]
    pub denom: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub dec_coins: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::DecCoin>,
}
/// DelegatorWithdrawInfo is the address for where delegation rewards are
/// withdrawn to by default this struct is only used at genesis to feed in
/// default withdraw addresses.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.DelegatorWithdrawInfo")]
pub struct DelegatorWithdrawInfo {
    /// delegator_address is the address of the delegator.
    #[prost(string, tag = "1")]
    pub delegator_address: ::prost::alloc::string::String,
    /// withdraw_address is the address to withdraw the delegation rewards to.
    #[prost(string, tag = "2")]
    pub withdraw_address: ::prost::alloc::string::String,
}
/// OutstandingRewardsRecord is used for import/export via genesis json.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.OutstandingRewardsRecord")]
pub struct OutstandingRewardsRecord {
    /// delegation_target_id is the ID of the delegation target.
    #[prost(uint32, tag = "1")]
    #[serde(alias = "delegation_targetID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub delegation_target_id: u32,
    /// outstanding_rewards represents the outstanding rewards of the delegation
    /// target.
    #[prost(message, repeated, tag = "2")]
    pub outstanding_rewards: ::prost::alloc::vec::Vec<DecPool>,
}
/// HistoricalRewardsRecord is used for import / export via genesis
/// json.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.HistoricalRewardsRecord")]
pub struct HistoricalRewardsRecord {
    /// delegation_target_id is the ID of the delegation target.
    #[prost(uint32, tag = "1")]
    #[serde(alias = "delegation_targetID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub delegation_target_id: u32,
    /// period defines the period the historical rewards apply to.
    #[prost(uint64, tag = "2")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub period: u64,
    /// rewards defines the historical rewards of the delegation target.
    #[prost(message, optional, tag = "3")]
    pub rewards: ::core::option::Option<HistoricalRewards>,
}
/// CurrentRewardsRecord is used for import / export via genesis json.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.CurrentRewardsRecord")]
pub struct CurrentRewardsRecord {
    /// delegation_target_id is the ID of the delegation target.
    #[prost(uint32, tag = "1")]
    #[serde(alias = "delegation_targetID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub delegation_target_id: u32,
    /// rewards defines the current rewards of the delegation target.
    #[prost(message, optional, tag = "2")]
    pub rewards: ::core::option::Option<CurrentRewards>,
}
/// DelegatorStartingInfoRecord used for import / export via genesis json.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.DelegatorStartingInfoRecord")]
pub struct DelegatorStartingInfoRecord {
    /// delegator_address is the address of the delegator.
    #[prost(string, tag = "1")]
    pub delegator_address: ::prost::alloc::string::String,
    /// delegation_target_id is the ID of the delegation target.
    #[prost(uint32, tag = "2")]
    #[serde(alias = "delegation_targetID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub delegation_target_id: u32,
    /// starting_info defines the starting info of a delegator.
    #[prost(message, optional, tag = "3")]
    pub starting_info: ::core::option::Option<DelegatorStartingInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.OperatorAccumulatedCommissionRecord")]
pub struct OperatorAccumulatedCommissionRecord {
    #[prost(uint32, tag = "1")]
    #[serde(alias = "operatorID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub operator_id: u32,
    /// accumulated is the accumulated commission of an operator.
    #[prost(message, optional, tag = "2")]
    pub accumulated: ::core::option::Option<AccumulatedCommission>,
}
/// DelegationTypeRecords groups various genesis records under the same type
/// of delegation target.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.DelegationTypeRecords")]
pub struct DelegationTypeRecords {
    /// outstanding_rewards defines the outstanding rewards of all delegation
    /// targets with the same delegation type at genesis.
    #[prost(message, repeated, tag = "1")]
    pub outstanding_rewards: ::prost::alloc::vec::Vec<OutstandingRewardsRecord>,
    /// historical_rewards defines the historical rewards of all delegation targets
    /// with the same delegation type at genesis.
    #[prost(message, repeated, tag = "2")]
    pub historical_rewards: ::prost::alloc::vec::Vec<HistoricalRewardsRecord>,
    /// current_rewards defines the current rewards of all delegation targets with
    /// the same delegation type at genesis.
    #[prost(message, repeated, tag = "3")]
    pub current_rewards: ::prost::alloc::vec::Vec<CurrentRewardsRecord>,
    /// delegator_starting_infos defines the delegator starting infos of all
    /// delegation targets with the same delegation type at genesis.
    #[prost(message, repeated, tag = "4")]
    pub delegator_starting_infos: ::prost::alloc::vec::Vec<DelegatorStartingInfoRecord>,
}
/// GenesisState defines the module's genesis state.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.GenesisState")]
pub struct GenesisState {
    /// Params defines the parameters of the module.
    #[prost(message, optional, tag = "1")]
    pub params: ::core::option::Option<Params>,
    /// NextRewardsPlanID represents the id to be used when creating the next
    /// rewards plan.
    #[prost(uint64, tag = "2")]
    #[serde(alias = "next_rewards_planID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub next_rewards_plan_id: u64,
    /// RewardsPlans defines the list of rewards plans.
    #[prost(message, repeated, tag = "3")]
    pub rewards_plans: ::prost::alloc::vec::Vec<RewardsPlan>,
    /// last_rewards_allocation_time is the last time rewards were allocated.
    #[prost(message, optional, tag = "4")]
    pub last_rewards_allocation_time: ::core::option::Option<crate::shim::Timestamp>,
    /// delegator_withdraw_infos defines the delegator withdraw infos at genesis.
    #[prost(message, repeated, tag = "5")]
    pub delegator_withdraw_infos: ::prost::alloc::vec::Vec<DelegatorWithdrawInfo>,
    /// pools_records defines a group of genesis records of all pools at genesis.
    #[prost(message, optional, tag = "6")]
    pub pools_records: ::core::option::Option<DelegationTypeRecords>,
    /// operators_records defines a group of genesis records of all operators at
    /// genesis.
    #[prost(message, optional, tag = "7")]
    pub operators_records: ::core::option::Option<DelegationTypeRecords>,
    /// services_records defines a group of genesis records of all services at
    /// genesis.
    #[prost(message, optional, tag = "8")]
    pub services_records: ::core::option::Option<DelegationTypeRecords>,
    /// operator_accumulated_commissions defines the accumulated commissions of all
    /// operators at genesis.
    #[prost(message, repeated, tag = "9")]
    pub operator_accumulated_commissions:
        ::prost::alloc::vec::Vec<OperatorAccumulatedCommissionRecord>,
}
/// MsgCreateRewardsPlan defines the message structure for the
/// CreateRewardsPlan gRPC service method. It allows an account to create a
/// new rewards plan. It requires a sender address as well as the details of
/// the plan to be created.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.MsgCreateRewardsPlan")]
pub struct MsgCreateRewardsPlan {
    /// Sender is the address of the user creating the rewards plan
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    #[prost(uint32, tag = "3")]
    #[serde(alias = "serviceID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub service_id: u32,
    /// Amount is the amount of rewards to be distributed.
    #[prost(message, repeated, tag = "4")]
    pub amount: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
    /// StartTime is the starting time of the plan.
    #[prost(message, optional, tag = "5")]
    pub start_time: ::core::option::Option<crate::shim::Timestamp>,
    /// EndTime is the ending time of the plan.
    #[prost(message, optional, tag = "6")]
    pub end_time: ::core::option::Option<crate::shim::Timestamp>,
    /// PoolsDistribution is the rewards distribution parameters for pools.
    #[prost(message, optional, tag = "7")]
    pub pools_distribution: ::core::option::Option<Distribution>,
    /// OperatorsDistribution is the rewards distribution parameters for operators.
    #[prost(message, optional, tag = "8")]
    pub operators_distribution: ::core::option::Option<Distribution>,
    /// UsersDistribution is the rewards distribution parameters for users who
    /// delegated directly to the service.
    #[prost(message, optional, tag = "9")]
    pub users_distribution: ::core::option::Option<UsersDistribution>,
}
/// MsgCreateRewardsPlanResponse is the return value of
/// MsgCreateRewardsPlan. It returns the newly created plan ID.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.MsgCreateRewardsPlanResponse")]
pub struct MsgCreateRewardsPlanResponse {
    /// NewRewardsPlanID is the ID of the newly created rewards plan
    #[prost(uint64, tag = "1")]
    #[serde(alias = "new_rewards_planID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub new_rewards_plan_id: u64,
}
/// MsgSetWithdrawAddress sets the withdraw address for a delegator(or an
/// operator when withdrawing commission).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.MsgSetWithdrawAddress")]
pub struct MsgSetWithdrawAddress {
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub withdraw_address: ::prost::alloc::string::String,
}
/// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response
/// type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.MsgSetWithdrawAddressResponse")]
pub struct MsgSetWithdrawAddressResponse {}
/// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator
/// from a single delegation target.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.MsgWithdrawDelegatorReward")]
pub struct MsgWithdrawDelegatorReward {
    #[prost(string, tag = "1")]
    pub delegator_address: ::prost::alloc::string::String,
    #[prost(enumeration = "super::super::restaking::v1::DelegationType", tag = "2")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub delegation_type: i32,
    #[prost(uint32, tag = "3")]
    #[serde(alias = "delegation_targetID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub delegation_target_id: u32,
}
/// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward
/// response type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.MsgWithdrawDelegatorRewardResponse")]
pub struct MsgWithdrawDelegatorRewardResponse {
    #[prost(message, repeated, tag = "1")]
    pub amount: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
/// MsgWithdrawOperatorCommission withdraws the full commission to the operator.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.MsgWithdrawOperatorCommission")]
pub struct MsgWithdrawOperatorCommission {
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    #[prost(uint32, tag = "2")]
    #[serde(alias = "operatorID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub operator_id: u32,
}
/// MsgWithdrawOperatorCommissionResponse defines the
/// Msg/WithdrawOperatorCommission response type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.MsgWithdrawOperatorCommissionResponse")]
pub struct MsgWithdrawOperatorCommissionResponse {
    /// Since: cosmos-sdk 0.46
    #[prost(message, repeated, tag = "1")]
    pub amount: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
/// MsgUpdateParams defines the message structure for the UpdateParams gRPC
/// service method. It allows the authority to update the module parameters.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.MsgUpdateParams")]
pub struct MsgUpdateParams {
    /// Authority is the address that controls the module (defaults to x/gov unless
    /// overwritten).
    #[prost(string, tag = "1")]
    pub authority: ::prost::alloc::string::String,
    /// Params define the parameters to update.
    ///
    /// NOTE: All parameters must be supplied.
    #[prost(message, optional, tag = "2")]
    pub params: ::core::option::Option<Params>,
}
/// MsgUpdateParamsResponse is the return value of MsgUpdateParams.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.MsgUpdateParamsResponse")]
pub struct MsgUpdateParamsResponse {}
/// QueryParamsRequest is the request type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryParamsRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/Params",
    response_type = QueryParamsResponse
)]
pub struct QueryParamsRequest {}
/// QueryParamsResponse is the response type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryParamsResponse")]
pub struct QueryParamsResponse {
    #[prost(message, optional, tag = "1")]
    pub params: ::core::option::Option<Params>,
}
/// QueryRewardsPlansRequest is the request type for the Query/RewardsPlans RPC
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryRewardsPlansRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/RewardsPlans",
    response_type = QueryRewardsPlansResponse
)]
pub struct QueryRewardsPlansRequest {
    /// pagination defines an optional pagination for the request.
    #[prost(message, optional, tag = "1")]
    pub pagination:
        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
/// QueryRewardsPlansResponse is the response type for the Query/RewardsPlans
/// RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryRewardsPlansResponse")]
pub struct QueryRewardsPlansResponse {
    #[prost(message, repeated, tag = "1")]
    pub rewards_plans: ::prost::alloc::vec::Vec<RewardsPlan>,
    /// pagination defines the pagination in the response.
    #[prost(message, optional, tag = "2")]
    pub pagination:
        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
/// QueryRewardsPlanRequest is the request type for the Query/RewardsPlan RPC
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryRewardsPlanRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/RewardsPlan",
    response_type = QueryRewardsPlanResponse
)]
pub struct QueryRewardsPlanRequest {
    #[prost(uint64, tag = "1")]
    #[serde(alias = "planID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub plan_id: u64,
}
/// QueryRewardsPlanResponse is the response type for the Query/RewardsPlan RPC
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryRewardsPlanResponse")]
pub struct QueryRewardsPlanResponse {
    #[prost(message, optional, tag = "2")]
    pub rewards_plan: ::core::option::Option<RewardsPlan>,
}
/// QueryPoolOutstandingRewardsRequest is the request type for the
/// Query/PoolOutstandingRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryPoolOutstandingRewardsRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/PoolOutstandingRewards",
    response_type = QueryPoolOutstandingRewardsResponse
)]
pub struct QueryPoolOutstandingRewardsRequest {
    /// pool_id defines the pool ID to query for.
    #[prost(uint32, tag = "1")]
    #[serde(alias = "poolID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub pool_id: u32,
}
/// QueryPoolOutstandingRewardsResponse is the response type for the
/// Query/PoolOutstandingRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryPoolOutstandingRewardsResponse")]
pub struct QueryPoolOutstandingRewardsResponse {
    #[prost(message, optional, tag = "1")]
    pub rewards: ::core::option::Option<OutstandingRewards>,
}
/// QueryOperatorOutstandingRewardsRequest is the request type for the
/// Query/OperatorOutstandingRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryOperatorOutstandingRewardsRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/OperatorOutstandingRewards",
    response_type = QueryOperatorOutstandingRewardsResponse
)]
pub struct QueryOperatorOutstandingRewardsRequest {
    /// operator_id defines the operator ID to query for.
    #[prost(uint32, tag = "1")]
    #[serde(alias = "operatorID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub operator_id: u32,
}
/// QueryOperatorOutstandingRewardsResponse is the response type for the
/// Query/OperatorOutstandingRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryOperatorOutstandingRewardsResponse")]
pub struct QueryOperatorOutstandingRewardsResponse {
    #[prost(message, optional, tag = "1")]
    pub rewards: ::core::option::Option<OutstandingRewards>,
}
/// QueryServiceOutstandingRewardsRequest is the request type for the
/// Query/ServiceOutstandingRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryServiceOutstandingRewardsRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/ServiceOutstandingRewards",
    response_type = QueryServiceOutstandingRewardsResponse
)]
pub struct QueryServiceOutstandingRewardsRequest {
    /// service_id defines the service ID to query for.
    #[prost(uint32, tag = "1")]
    #[serde(alias = "serviceID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub service_id: u32,
}
/// QueryServiceOutstandingRewardsResponse is the response type for the
/// Query/ServiceOutstandingRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryServiceOutstandingRewardsResponse")]
pub struct QueryServiceOutstandingRewardsResponse {
    #[prost(message, optional, tag = "1")]
    pub rewards: ::core::option::Option<OutstandingRewards>,
}
/// QueryOperatorCommissionRequest is the request type for the
/// Query/OperatorCommission RPC method
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryOperatorCommissionRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/OperatorCommission",
    response_type = QueryOperatorCommissionResponse
)]
pub struct QueryOperatorCommissionRequest {
    /// operator_id defines the validator address to query for.
    #[prost(uint32, tag = "1")]
    #[serde(alias = "operatorID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub operator_id: u32,
}
/// QueryOperatorCommissionResponse is the response type for the
/// Query/OperatorCommission RPC method
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryOperatorCommissionResponse")]
pub struct QueryOperatorCommissionResponse {
    /// commission defines the commission the operator received.
    #[prost(message, optional, tag = "1")]
    pub commission: ::core::option::Option<AccumulatedCommission>,
}
/// QueryPoolDelegationRewardsRequest is the request type for the
/// Query/PoolDelegationRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryPoolDelegationRewardsRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/PoolDelegationRewards",
    response_type = QueryPoolDelegationRewardsResponse
)]
pub struct QueryPoolDelegationRewardsRequest {
    /// delegator_address defines the delegator address to query for.
    #[prost(string, tag = "1")]
    pub delegator_address: ::prost::alloc::string::String,
    /// pool_id defines the pool ID to query for.
    #[prost(uint32, tag = "2")]
    #[serde(alias = "poolID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub pool_id: u32,
}
/// QueryPoolDelegationRewardsResponse is the response type for the
/// Query/PoolDelegationRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryPoolDelegationRewardsResponse")]
pub struct QueryPoolDelegationRewardsResponse {
    /// rewards defines the rewards accrued by a delegation.
    #[prost(message, repeated, tag = "1")]
    pub rewards: ::prost::alloc::vec::Vec<DecPool>,
}
/// QueryOperatorDelegationRewardsRequest is the request type for the
/// Query/OperatorDelegationRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryOperatorDelegationRewardsRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/OperatorDelegationRewards",
    response_type = QueryOperatorDelegationRewardsResponse
)]
pub struct QueryOperatorDelegationRewardsRequest {
    /// delegator_address defines the delegator address to query for.
    #[prost(string, tag = "1")]
    pub delegator_address: ::prost::alloc::string::String,
    /// operator_id defines the operator ID to query for.
    #[prost(uint32, tag = "2")]
    #[serde(alias = "operatorID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub operator_id: u32,
}
/// QueryOperatorDelegationRewardsResponse is the response type for the
/// Query/OperatorDelegationRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryOperatorDelegationRewardsResponse")]
pub struct QueryOperatorDelegationRewardsResponse {
    /// rewards defines the rewards accrued by a delegation.
    #[prost(message, repeated, tag = "1")]
    pub rewards: ::prost::alloc::vec::Vec<DecPool>,
}
/// QueryServiceDelegationRewardsRequest is the request type for the
/// Query/ServiceDelegationRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryServiceDelegationRewardsRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/ServiceDelegationRewards",
    response_type = QueryServiceDelegationRewardsResponse
)]
pub struct QueryServiceDelegationRewardsRequest {
    /// delegator_address defines the delegator address to query for.
    #[prost(string, tag = "1")]
    pub delegator_address: ::prost::alloc::string::String,
    /// service_id defines the service ID to query for.
    #[prost(uint32, tag = "2")]
    #[serde(alias = "serviceID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub service_id: u32,
}
/// QueryServiceDelegationRewardsResponse is the response type for the
/// Query/ServiceDelegationRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryServiceDelegationRewardsResponse")]
pub struct QueryServiceDelegationRewardsResponse {
    /// rewards defines the rewards accrued by a delegation.
    #[prost(message, repeated, tag = "1")]
    pub rewards: ::prost::alloc::vec::Vec<DecPool>,
}
/// QueryDelegatorTotalRewardsRequest is the request type for the
/// Query/DelegatorTotalRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryDelegatorTotalRewardsRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/DelegatorTotalRewards",
    response_type = QueryDelegatorTotalRewardsResponse
)]
pub struct QueryDelegatorTotalRewardsRequest {
    /// delegator_address defines the delegator address to query for.
    #[prost(string, tag = "1")]
    pub delegator_address: ::prost::alloc::string::String,
}
/// QueryDelegatorTotalRewardsResponse is the response type for the
/// Query/DelegatorTotalRewards RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryDelegatorTotalRewardsResponse")]
pub struct QueryDelegatorTotalRewardsResponse {
    /// rewards defines all the rewards accrued by a delegator.
    #[prost(message, repeated, tag = "1")]
    pub rewards: ::prost::alloc::vec::Vec<DelegationDelegatorReward>,
    /// total defines the sum of all the rewards.
    #[prost(message, repeated, tag = "2")]
    pub total: ::prost::alloc::vec::Vec<DecPool>,
}
/// QueryDelegatorWithdrawAddressRequest is the request type for the
/// Query/DelegatorWithdrawAddress RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryDelegatorWithdrawAddressRequest")]
#[proto_query(
    path = "/milkyway.rewards.v1.Query/DelegatorWithdrawAddress",
    response_type = QueryDelegatorWithdrawAddressResponse
)]
pub struct QueryDelegatorWithdrawAddressRequest {
    /// delegator_address defines the delegator address to query for.
    #[prost(string, tag = "1")]
    pub delegator_address: ::prost::alloc::string::String,
}
/// QueryDelegatorWithdrawAddressResponse is the response type for the
/// Query/DelegatorWithdrawAddress RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.rewards.v1.QueryDelegatorWithdrawAddressResponse")]
pub struct QueryDelegatorWithdrawAddressResponse {
    /// withdraw_address defines the delegator address to query for.
    #[prost(string, tag = "1")]
    pub withdraw_address: ::prost::alloc::string::String,
}
pub struct RewardsQuerier<'a, Q: cosmwasm_std::CustomQuery> {
    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
}
impl<'a, Q: cosmwasm_std::CustomQuery> RewardsQuerier<'a, Q> {
    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
        Self { querier }
    }
    pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
        QueryParamsRequest {}.query(self.querier)
    }
    pub fn rewards_plans(
        &self,
        pagination: ::core::option::Option<
            super::super::super::cosmos::base::query::v1beta1::PageRequest,
        >,
    ) -> Result<QueryRewardsPlansResponse, cosmwasm_std::StdError> {
        QueryRewardsPlansRequest { pagination }.query(self.querier)
    }
    pub fn rewards_plan(
        &self,
        plan_id: u64,
    ) -> Result<QueryRewardsPlanResponse, cosmwasm_std::StdError> {
        QueryRewardsPlanRequest { plan_id }.query(self.querier)
    }
    pub fn pool_outstanding_rewards(
        &self,
        pool_id: u32,
    ) -> Result<QueryPoolOutstandingRewardsResponse, cosmwasm_std::StdError> {
        QueryPoolOutstandingRewardsRequest { pool_id }.query(self.querier)
    }
    pub fn operator_outstanding_rewards(
        &self,
        operator_id: u32,
    ) -> Result<QueryOperatorOutstandingRewardsResponse, cosmwasm_std::StdError> {
        QueryOperatorOutstandingRewardsRequest { operator_id }.query(self.querier)
    }
    pub fn service_outstanding_rewards(
        &self,
        service_id: u32,
    ) -> Result<QueryServiceOutstandingRewardsResponse, cosmwasm_std::StdError> {
        QueryServiceOutstandingRewardsRequest { service_id }.query(self.querier)
    }
    pub fn operator_commission(
        &self,
        operator_id: u32,
    ) -> Result<QueryOperatorCommissionResponse, cosmwasm_std::StdError> {
        QueryOperatorCommissionRequest { operator_id }.query(self.querier)
    }
    pub fn pool_delegation_rewards(
        &self,
        delegator_address: ::prost::alloc::string::String,
        pool_id: u32,
    ) -> Result<QueryPoolDelegationRewardsResponse, cosmwasm_std::StdError> {
        QueryPoolDelegationRewardsRequest {
            delegator_address,
            pool_id,
        }
        .query(self.querier)
    }
    pub fn operator_delegation_rewards(
        &self,
        delegator_address: ::prost::alloc::string::String,
        operator_id: u32,
    ) -> Result<QueryOperatorDelegationRewardsResponse, cosmwasm_std::StdError> {
        QueryOperatorDelegationRewardsRequest {
            delegator_address,
            operator_id,
        }
        .query(self.querier)
    }
    pub fn service_delegation_rewards(
        &self,
        delegator_address: ::prost::alloc::string::String,
        service_id: u32,
    ) -> Result<QueryServiceDelegationRewardsResponse, cosmwasm_std::StdError> {
        QueryServiceDelegationRewardsRequest {
            delegator_address,
            service_id,
        }
        .query(self.querier)
    }
    pub fn delegator_total_rewards(
        &self,
        delegator_address: ::prost::alloc::string::String,
    ) -> Result<QueryDelegatorTotalRewardsResponse, cosmwasm_std::StdError> {
        QueryDelegatorTotalRewardsRequest { delegator_address }.query(self.querier)
    }
    pub fn delegator_withdraw_address(
        &self,
        delegator_address: ::prost::alloc::string::String,
    ) -> Result<QueryDelegatorWithdrawAddressResponse, cosmwasm_std::StdError> {
        QueryDelegatorWithdrawAddressRequest { delegator_address }.query(self.querier)
    }
}
