use milkyway_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 = "/stride.interchainquery.v1.Query")]
pub struct Query {
    #[prost(string, tag = "1")]
    #[serde(alias = "ID")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    #[serde(alias = "connectionID")]
    pub connection_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    #[serde(alias = "chainID")]
    pub chain_id: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub query_type: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "5")]
    #[serde(
        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
    )]
    pub request_data: ::prost::alloc::vec::Vec<u8>,
    #[prost(string, tag = "13")]
    pub callback_module: ::prost::alloc::string::String,
    #[prost(string, tag = "8")]
    #[serde(alias = "callbackID")]
    pub callback_id: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "12")]
    #[serde(
        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
    )]
    pub callback_data: ::prost::alloc::vec::Vec<u8>,
    #[prost(enumeration = "TimeoutPolicy", tag = "15")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub timeout_policy: i32,
    #[prost(message, optional, tag = "14")]
    pub timeout_duration: ::core::option::Option<crate::shim::Duration>,
    #[prost(uint64, tag = "9")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub timeout_timestamp: u64,
    #[prost(bool, tag = "11")]
    pub request_sent: bool,
    #[prost(uint64, tag = "16")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub submission_height: 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 = "/stride.interchainquery.v1.DataPoint")]
pub struct DataPoint {
    #[prost(string, tag = "1")]
    #[serde(alias = "ID")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub remote_height: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub local_height: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "4")]
    #[serde(
        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
    )]
    pub value: ::prost::alloc::vec::Vec<u8>,
}
/// GenesisState defines the epochs 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 = "/stride.interchainquery.v1.GenesisState")]
pub struct GenesisState {
    #[prost(message, repeated, tag = "1")]
    pub queries: ::prost::alloc::vec::Vec<Query>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
pub enum TimeoutPolicy {
    RejectQueryResponse = 0,
    RetryQueryRequest = 1,
    ExecuteQueryCallback = 2,
}
impl TimeoutPolicy {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            TimeoutPolicy::RejectQueryResponse => "REJECT_QUERY_RESPONSE",
            TimeoutPolicy::RetryQueryRequest => "RETRY_QUERY_REQUEST",
            TimeoutPolicy::ExecuteQueryCallback => "EXECUTE_QUERY_CALLBACK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "REJECT_QUERY_RESPONSE" => Some(Self::RejectQueryResponse),
            "RETRY_QUERY_REQUEST" => Some(Self::RetryQueryRequest),
            "EXECUTE_QUERY_CALLBACK" => Some(Self::ExecuteQueryCallback),
            _ => None,
        }
    }
}
/// MsgSubmitQueryResponse represents a message type to fulfil a 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 = "/stride.interchainquery.v1.MsgSubmitQueryResponse")]
pub struct MsgSubmitQueryResponse {
    #[prost(string, tag = "1")]
    #[serde(alias = "chainID")]
    pub chain_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    #[serde(alias = "queryID")]
    pub query_id: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "3")]
    #[serde(
        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
    )]
    pub result: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "4")]
    pub proof_ops: ::core::option::Option<super::super::super::tendermint::crypto::ProofOps>,
    #[prost(int64, tag = "5")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub height: i64,
    #[prost(string, tag = "6")]
    pub from_address: ::prost::alloc::string::String,
}
/// MsgSubmitQueryResponseResponse defines the MsgSubmitQueryResponse 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 = "/stride.interchainquery.v1.MsgSubmitQueryResponseResponse")]
pub struct MsgSubmitQueryResponseResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/stride.interchainquery.v1.QueryPendingQueriesRequest")]
pub struct QueryPendingQueriesRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/stride.interchainquery.v1.QueryPendingQueriesResponse")]
pub struct QueryPendingQueriesResponse {
    #[prost(message, repeated, tag = "1")]
    pub pending_queries: ::prost::alloc::vec::Vec<Query>,
}
