use osmosis_std_derive::CosmwasmExt;
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.Params")]
pub struct Params {
    #[prost(message, optional, tag = "1")]
    pub default_redemption_notice_period_duration: ::core::option::Option<crate::shim::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.InsuranceFund")]
pub struct InsuranceFund {
    #[prost(string, tag = "1")]
    pub deposit_denom: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub insurance_pool_token_denom: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub redemption_notice_period_duration: ::core::option::Option<crate::shim::Duration>,
    #[prost(string, tag = "4")]
    pub balance: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub total_share: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    #[serde(alias = "marketID")]
    pub market_id: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub market_ticker: ::prost::alloc::string::String,
    #[prost(string, tag = "8")]
    pub oracle_base: ::prost::alloc::string::String,
    #[prost(string, tag = "9")]
    pub oracle_quote: ::prost::alloc::string::String,
    #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "10")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub oracle_type: i32,
    #[prost(int64, tag = "11")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub expiry: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.RedemptionSchedule")]
pub struct RedemptionSchedule {
    #[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,
    #[prost(string, tag = "2")]
    #[serde(alias = "marketID")]
    pub market_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub redeemer: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub claimable_redemption_time: ::core::option::Option<crate::shim::Timestamp>,
    #[prost(message, optional, tag = "5")]
    pub redemption_amount: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.EventInsuranceFundUpdate")]
pub struct EventInsuranceFundUpdate {
    #[prost(message, optional, tag = "1")]
    pub fund: ::core::option::Option<InsuranceFund>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.EventRequestRedemption")]
pub struct EventRequestRedemption {
    #[prost(message, optional, tag = "1")]
    pub schedule: ::core::option::Option<RedemptionSchedule>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.EventWithdrawRedemption")]
pub struct EventWithdrawRedemption {
    #[prost(message, optional, tag = "1")]
    pub schedule: ::core::option::Option<RedemptionSchedule>,
    #[prost(message, optional, tag = "2")]
    pub redeem_coin: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.EventUnderwrite")]
pub struct EventUnderwrite {
    #[prost(string, tag = "1")]
    pub underwriter: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    #[serde(alias = "marketID")]
    pub market_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub deposit: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "4")]
    pub shares: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.GenesisState")]
pub struct GenesisState {
    #[prost(message, optional, tag = "1")]
    pub params: ::core::option::Option<Params>,
    #[prost(message, repeated, tag = "2")]
    pub insurance_funds: ::prost::alloc::vec::Vec<InsuranceFund>,
    #[prost(message, repeated, tag = "3")]
    pub redemption_schedule: ::prost::alloc::vec::Vec<RedemptionSchedule>,
    #[prost(uint64, tag = "4")]
    #[serde(alias = "next_share_denomID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub next_share_denom_id: u64,
    #[prost(uint64, tag = "5")]
    #[serde(alias = "next_redemption_scheduleID")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub next_redemption_schedule_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryInsuranceParamsRequest")]
#[proto_query(
    path = "/injective.insurance.v1beta1.Query/InsuranceParams",
    response_type = QueryInsuranceParamsResponse
)]
pub struct QueryInsuranceParamsRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryInsuranceParamsResponse")]
pub struct QueryInsuranceParamsResponse {
    #[prost(message, optional, tag = "1")]
    pub params: ::core::option::Option<Params>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryInsuranceFundRequest")]
#[proto_query(
    path = "/injective.insurance.v1beta1.Query/InsuranceFund",
    response_type = QueryInsuranceFundResponse
)]
pub struct QueryInsuranceFundRequest {
    #[prost(string, tag = "1")]
    #[serde(alias = "marketID")]
    pub market_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryInsuranceFundResponse")]
pub struct QueryInsuranceFundResponse {
    #[prost(message, optional, tag = "1")]
    pub fund: ::core::option::Option<InsuranceFund>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryInsuranceFundsRequest")]
#[proto_query(
    path = "/injective.insurance.v1beta1.Query/InsuranceFunds",
    response_type = QueryInsuranceFundsResponse
)]
pub struct QueryInsuranceFundsRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryInsuranceFundsResponse")]
pub struct QueryInsuranceFundsResponse {
    #[prost(message, repeated, tag = "1")]
    pub funds: ::prost::alloc::vec::Vec<InsuranceFund>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryEstimatedRedemptionsRequest")]
#[proto_query(
    path = "/injective.insurance.v1beta1.Query/EstimatedRedemptions",
    response_type = QueryEstimatedRedemptionsResponse
)]
pub struct QueryEstimatedRedemptionsRequest {
    #[prost(string, tag = "1")]
    #[serde(alias = "marketID")]
    pub market_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryEstimatedRedemptionsResponse")]
pub struct QueryEstimatedRedemptionsResponse {
    #[prost(message, repeated, tag = "1")]
    pub amount: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryPendingRedemptionsRequest")]
#[proto_query(
    path = "/injective.insurance.v1beta1.Query/PendingRedemptions",
    response_type = QueryPendingRedemptionsResponse
)]
pub struct QueryPendingRedemptionsRequest {
    #[prost(string, tag = "1")]
    #[serde(alias = "marketID")]
    pub market_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryPendingRedemptionsResponse")]
pub struct QueryPendingRedemptionsResponse {
    #[prost(message, repeated, tag = "1")]
    pub amount: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryModuleStateRequest")]
#[proto_query(
    path = "/injective.insurance.v1beta1.Query/InsuranceModuleState",
    response_type = QueryModuleStateResponse
)]
pub struct QueryModuleStateRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.QueryModuleStateResponse")]
pub struct QueryModuleStateResponse {
    #[prost(message, optional, tag = "1")]
    pub state: ::core::option::Option<GenesisState>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.MsgCreateInsuranceFund")]
pub struct MsgCreateInsuranceFund {
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub ticker: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub quote_denom: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub oracle_base: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub oracle_quote: ::prost::alloc::string::String,
    #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "6")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub oracle_type: i32,
    #[prost(int64, tag = "7")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub expiry: i64,
    #[prost(message, optional, tag = "8")]
    pub initial_deposit: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.MsgCreateInsuranceFundResponse")]
pub struct MsgCreateInsuranceFundResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.MsgUnderwrite")]
pub struct MsgUnderwrite {
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    #[serde(alias = "marketID")]
    pub market_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub deposit: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.MsgUnderwriteResponse")]
pub struct MsgUnderwriteResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.MsgRequestRedemption")]
pub struct MsgRequestRedemption {
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    #[serde(alias = "marketID")]
    pub market_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub amount: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.MsgRequestRedemptionResponse")]
pub struct MsgRequestRedemptionResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.MsgUpdateParams")]
pub struct MsgUpdateParams {
    #[prost(string, tag = "1")]
    pub authority: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub params: ::core::option::Option<Params>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.insurance.v1beta1.MsgUpdateParamsResponse")]
pub struct MsgUpdateParamsResponse {}
pub struct InsuranceQuerier<'a, Q: cosmwasm_std::CustomQuery> {
    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
}
impl<'a, Q: cosmwasm_std::CustomQuery> InsuranceQuerier<'a, Q> {
    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
        Self { querier }
    }
    pub fn insurance_params(&self) -> Result<QueryInsuranceParamsResponse, cosmwasm_std::StdError> {
        QueryInsuranceParamsRequest {}.query(self.querier)
    }
    pub fn insurance_fund(&self, market_id: ::prost::alloc::string::String) -> Result<QueryInsuranceFundResponse, cosmwasm_std::StdError> {
        QueryInsuranceFundRequest { market_id }.query(self.querier)
    }
    pub fn insurance_funds(&self) -> Result<QueryInsuranceFundsResponse, cosmwasm_std::StdError> {
        QueryInsuranceFundsRequest {}.query(self.querier)
    }
    pub fn estimated_redemptions(
        &self,
        market_id: ::prost::alloc::string::String,
        address: ::prost::alloc::string::String,
    ) -> Result<QueryEstimatedRedemptionsResponse, cosmwasm_std::StdError> {
        QueryEstimatedRedemptionsRequest { market_id, address }.query(self.querier)
    }
    pub fn pending_redemptions(
        &self,
        market_id: ::prost::alloc::string::String,
        address: ::prost::alloc::string::String,
    ) -> Result<QueryPendingRedemptionsResponse, cosmwasm_std::StdError> {
        QueryPendingRedemptionsRequest { market_id, address }.query(self.querier)
    }
    pub fn insurance_module_state(&self) -> Result<QueryModuleStateResponse, cosmwasm_std::StdError> {
        QueryModuleStateRequest {}.query(self.querier)
    }
}