abci 0.4.0

Tendermint ABCI server for Rust
Documentation
// This file is generated by rust-protobuf 2.2.0. Do not edit
// @generated

// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy)]

#![cfg_attr(rustfmt, rustfmt_skip)]

#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]

use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;

#[derive(PartialEq,Clone,Default)]
pub struct Request {
    // message oneof groups
    pub value: ::std::option::Option<Request_oneof_value>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

#[derive(Clone,PartialEq)]
pub enum Request_oneof_value {
    echo(RequestEcho),
    flush(RequestFlush),
    info(RequestInfo),
    set_option(RequestSetOption),
    init_chain(RequestInitChain),
    query(RequestQuery),
    begin_block(RequestBeginBlock),
    check_tx(RequestCheckTx),
    deliver_tx(RequestDeliverTx),
    end_block(RequestEndBlock),
    commit(RequestCommit),
}

impl Request {
    pub fn new() -> Request {
        ::std::default::Default::default()
    }

    // .types.RequestEcho echo = 2;

    pub fn clear_echo(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_echo(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::echo(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_echo(&mut self, v: RequestEcho) {
        self.value = ::std::option::Option::Some(Request_oneof_value::echo(v))
    }

    // Mutable pointer to the field.
    pub fn mut_echo(&mut self) -> &mut RequestEcho {
        if let ::std::option::Option::Some(Request_oneof_value::echo(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::echo(RequestEcho::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::echo(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_echo(&mut self) -> RequestEcho {
        if self.has_echo() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::echo(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestEcho::new()
        }
    }

    pub fn get_echo(&self) -> &RequestEcho {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::echo(ref v)) => v,
            _ => RequestEcho::default_instance(),
        }
    }

    // .types.RequestFlush flush = 3;

    pub fn clear_flush(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_flush(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::flush(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_flush(&mut self, v: RequestFlush) {
        self.value = ::std::option::Option::Some(Request_oneof_value::flush(v))
    }

    // Mutable pointer to the field.
    pub fn mut_flush(&mut self) -> &mut RequestFlush {
        if let ::std::option::Option::Some(Request_oneof_value::flush(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::flush(RequestFlush::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::flush(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_flush(&mut self) -> RequestFlush {
        if self.has_flush() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::flush(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestFlush::new()
        }
    }

    pub fn get_flush(&self) -> &RequestFlush {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::flush(ref v)) => v,
            _ => RequestFlush::default_instance(),
        }
    }

    // .types.RequestInfo info = 4;

    pub fn clear_info(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_info(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::info(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_info(&mut self, v: RequestInfo) {
        self.value = ::std::option::Option::Some(Request_oneof_value::info(v))
    }

    // Mutable pointer to the field.
    pub fn mut_info(&mut self) -> &mut RequestInfo {
        if let ::std::option::Option::Some(Request_oneof_value::info(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::info(RequestInfo::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::info(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_info(&mut self) -> RequestInfo {
        if self.has_info() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::info(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestInfo::new()
        }
    }

    pub fn get_info(&self) -> &RequestInfo {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::info(ref v)) => v,
            _ => RequestInfo::default_instance(),
        }
    }

    // .types.RequestSetOption set_option = 5;

    pub fn clear_set_option(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_set_option(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::set_option(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_set_option(&mut self, v: RequestSetOption) {
        self.value = ::std::option::Option::Some(Request_oneof_value::set_option(v))
    }

    // Mutable pointer to the field.
    pub fn mut_set_option(&mut self) -> &mut RequestSetOption {
        if let ::std::option::Option::Some(Request_oneof_value::set_option(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::set_option(RequestSetOption::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::set_option(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_set_option(&mut self) -> RequestSetOption {
        if self.has_set_option() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::set_option(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestSetOption::new()
        }
    }

    pub fn get_set_option(&self) -> &RequestSetOption {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::set_option(ref v)) => v,
            _ => RequestSetOption::default_instance(),
        }
    }

    // .types.RequestInitChain init_chain = 6;

    pub fn clear_init_chain(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_init_chain(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::init_chain(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_init_chain(&mut self, v: RequestInitChain) {
        self.value = ::std::option::Option::Some(Request_oneof_value::init_chain(v))
    }

    // Mutable pointer to the field.
    pub fn mut_init_chain(&mut self) -> &mut RequestInitChain {
        if let ::std::option::Option::Some(Request_oneof_value::init_chain(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::init_chain(RequestInitChain::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::init_chain(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_init_chain(&mut self) -> RequestInitChain {
        if self.has_init_chain() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::init_chain(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestInitChain::new()
        }
    }

    pub fn get_init_chain(&self) -> &RequestInitChain {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::init_chain(ref v)) => v,
            _ => RequestInitChain::default_instance(),
        }
    }

    // .types.RequestQuery query = 7;

    pub fn clear_query(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_query(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::query(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_query(&mut self, v: RequestQuery) {
        self.value = ::std::option::Option::Some(Request_oneof_value::query(v))
    }

    // Mutable pointer to the field.
    pub fn mut_query(&mut self) -> &mut RequestQuery {
        if let ::std::option::Option::Some(Request_oneof_value::query(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::query(RequestQuery::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::query(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_query(&mut self) -> RequestQuery {
        if self.has_query() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::query(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestQuery::new()
        }
    }

    pub fn get_query(&self) -> &RequestQuery {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::query(ref v)) => v,
            _ => RequestQuery::default_instance(),
        }
    }

    // .types.RequestBeginBlock begin_block = 8;

    pub fn clear_begin_block(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_begin_block(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::begin_block(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_begin_block(&mut self, v: RequestBeginBlock) {
        self.value = ::std::option::Option::Some(Request_oneof_value::begin_block(v))
    }

    // Mutable pointer to the field.
    pub fn mut_begin_block(&mut self) -> &mut RequestBeginBlock {
        if let ::std::option::Option::Some(Request_oneof_value::begin_block(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::begin_block(RequestBeginBlock::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::begin_block(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_begin_block(&mut self) -> RequestBeginBlock {
        if self.has_begin_block() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::begin_block(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestBeginBlock::new()
        }
    }

    pub fn get_begin_block(&self) -> &RequestBeginBlock {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::begin_block(ref v)) => v,
            _ => RequestBeginBlock::default_instance(),
        }
    }

    // .types.RequestCheckTx check_tx = 9;

    pub fn clear_check_tx(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_check_tx(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::check_tx(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_check_tx(&mut self, v: RequestCheckTx) {
        self.value = ::std::option::Option::Some(Request_oneof_value::check_tx(v))
    }

    // Mutable pointer to the field.
    pub fn mut_check_tx(&mut self) -> &mut RequestCheckTx {
        if let ::std::option::Option::Some(Request_oneof_value::check_tx(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::check_tx(RequestCheckTx::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::check_tx(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_check_tx(&mut self) -> RequestCheckTx {
        if self.has_check_tx() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::check_tx(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestCheckTx::new()
        }
    }

    pub fn get_check_tx(&self) -> &RequestCheckTx {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::check_tx(ref v)) => v,
            _ => RequestCheckTx::default_instance(),
        }
    }

    // .types.RequestDeliverTx deliver_tx = 19;

    pub fn clear_deliver_tx(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_deliver_tx(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::deliver_tx(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_deliver_tx(&mut self, v: RequestDeliverTx) {
        self.value = ::std::option::Option::Some(Request_oneof_value::deliver_tx(v))
    }

    // Mutable pointer to the field.
    pub fn mut_deliver_tx(&mut self) -> &mut RequestDeliverTx {
        if let ::std::option::Option::Some(Request_oneof_value::deliver_tx(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::deliver_tx(RequestDeliverTx::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::deliver_tx(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_deliver_tx(&mut self) -> RequestDeliverTx {
        if self.has_deliver_tx() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::deliver_tx(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestDeliverTx::new()
        }
    }

    pub fn get_deliver_tx(&self) -> &RequestDeliverTx {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::deliver_tx(ref v)) => v,
            _ => RequestDeliverTx::default_instance(),
        }
    }

    // .types.RequestEndBlock end_block = 11;

    pub fn clear_end_block(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_end_block(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::end_block(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_end_block(&mut self, v: RequestEndBlock) {
        self.value = ::std::option::Option::Some(Request_oneof_value::end_block(v))
    }

    // Mutable pointer to the field.
    pub fn mut_end_block(&mut self) -> &mut RequestEndBlock {
        if let ::std::option::Option::Some(Request_oneof_value::end_block(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::end_block(RequestEndBlock::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::end_block(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_end_block(&mut self) -> RequestEndBlock {
        if self.has_end_block() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::end_block(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestEndBlock::new()
        }
    }

    pub fn get_end_block(&self) -> &RequestEndBlock {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::end_block(ref v)) => v,
            _ => RequestEndBlock::default_instance(),
        }
    }

    // .types.RequestCommit commit = 12;

    pub fn clear_commit(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_commit(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::commit(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_commit(&mut self, v: RequestCommit) {
        self.value = ::std::option::Option::Some(Request_oneof_value::commit(v))
    }

    // Mutable pointer to the field.
    pub fn mut_commit(&mut self) -> &mut RequestCommit {
        if let ::std::option::Option::Some(Request_oneof_value::commit(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Request_oneof_value::commit(RequestCommit::new()));
        }
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::commit(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_commit(&mut self) -> RequestCommit {
        if self.has_commit() {
            match self.value.take() {
                ::std::option::Option::Some(Request_oneof_value::commit(v)) => v,
                _ => panic!(),
            }
        } else {
            RequestCommit::new()
        }
    }

    pub fn get_commit(&self) -> &RequestCommit {
        match self.value {
            ::std::option::Option::Some(Request_oneof_value::commit(ref v)) => v,
            _ => RequestCommit::default_instance(),
        }
    }
}

impl ::protobuf::Message for Request {
    fn is_initialized(&self) -> bool {
        if let Some(Request_oneof_value::echo(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Request_oneof_value::flush(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Request_oneof_value::info(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Request_oneof_value::set_option(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Request_oneof_value::init_chain(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Request_oneof_value::query(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Request_oneof_value::begin_block(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Request_oneof_value::check_tx(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Request_oneof_value::deliver_tx(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Request_oneof_value::end_block(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Request_oneof_value::commit(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::echo(is.read_message()?));
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::flush(is.read_message()?));
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::info(is.read_message()?));
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::set_option(is.read_message()?));
                },
                6 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::init_chain(is.read_message()?));
                },
                7 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::query(is.read_message()?));
                },
                8 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::begin_block(is.read_message()?));
                },
                9 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::check_tx(is.read_message()?));
                },
                19 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::deliver_tx(is.read_message()?));
                },
                11 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::end_block(is.read_message()?));
                },
                12 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Request_oneof_value::commit(is.read_message()?));
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let ::std::option::Option::Some(ref v) = self.value {
            match v {
                &Request_oneof_value::echo(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Request_oneof_value::flush(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Request_oneof_value::info(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Request_oneof_value::set_option(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Request_oneof_value::init_chain(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Request_oneof_value::query(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Request_oneof_value::begin_block(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Request_oneof_value::check_tx(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Request_oneof_value::deliver_tx(ref v) => {
                    let len = v.compute_size();
                    my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Request_oneof_value::end_block(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Request_oneof_value::commit(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
            };
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if let ::std::option::Option::Some(ref v) = self.value {
            match v {
                &Request_oneof_value::echo(ref v) => {
                    os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Request_oneof_value::flush(ref v) => {
                    os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Request_oneof_value::info(ref v) => {
                    os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Request_oneof_value::set_option(ref v) => {
                    os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Request_oneof_value::init_chain(ref v) => {
                    os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Request_oneof_value::query(ref v) => {
                    os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Request_oneof_value::begin_block(ref v) => {
                    os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Request_oneof_value::check_tx(ref v) => {
                    os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Request_oneof_value::deliver_tx(ref v) => {
                    os.write_tag(19, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Request_oneof_value::end_block(ref v) => {
                    os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Request_oneof_value::commit(ref v) => {
                    os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
            };
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> Request {
        Request::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestEcho>(
                    "echo",
                    Request::has_echo,
                    Request::get_echo,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestFlush>(
                    "flush",
                    Request::has_flush,
                    Request::get_flush,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestInfo>(
                    "info",
                    Request::has_info,
                    Request::get_info,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestSetOption>(
                    "set_option",
                    Request::has_set_option,
                    Request::get_set_option,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestInitChain>(
                    "init_chain",
                    Request::has_init_chain,
                    Request::get_init_chain,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestQuery>(
                    "query",
                    Request::has_query,
                    Request::get_query,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestBeginBlock>(
                    "begin_block",
                    Request::has_begin_block,
                    Request::get_begin_block,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestCheckTx>(
                    "check_tx",
                    Request::has_check_tx,
                    Request::get_check_tx,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestDeliverTx>(
                    "deliver_tx",
                    Request::has_deliver_tx,
                    Request::get_deliver_tx,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestEndBlock>(
                    "end_block",
                    Request::has_end_block,
                    Request::get_end_block,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestCommit>(
                    "commit",
                    Request::has_commit,
                    Request::get_commit,
                ));
                ::protobuf::reflect::MessageDescriptor::new::<Request>(
                    "Request",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static Request {
        static mut instance: ::protobuf::lazy::Lazy<Request> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const Request,
        };
        unsafe {
            instance.get(Request::new)
        }
    }
}

impl ::protobuf::Clear for Request {
    fn clear(&mut self) {
        self.clear_echo();
        self.clear_flush();
        self.clear_info();
        self.clear_set_option();
        self.clear_init_chain();
        self.clear_query();
        self.clear_begin_block();
        self.clear_check_tx();
        self.clear_deliver_tx();
        self.clear_end_block();
        self.clear_commit();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for Request {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Request {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestEcho {
    // message fields
    pub message: ::std::string::String,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestEcho {
    pub fn new() -> RequestEcho {
        ::std::default::Default::default()
    }

    // string message = 1;

    pub fn clear_message(&mut self) {
        self.message.clear();
    }

    // Param is passed by value, moved
    pub fn set_message(&mut self, v: ::std::string::String) {
        self.message = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_message(&mut self) -> &mut ::std::string::String {
        &mut self.message
    }

    // Take field
    pub fn take_message(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.message, ::std::string::String::new())
    }

    pub fn get_message(&self) -> &str {
        &self.message
    }
}

impl ::protobuf::Message for RequestEcho {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.message)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.message.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.message);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.message.is_empty() {
            os.write_string(1, &self.message)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestEcho {
        RequestEcho::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "message",
                    |m: &RequestEcho| { &m.message },
                    |m: &mut RequestEcho| { &mut m.message },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<RequestEcho>(
                    "RequestEcho",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestEcho {
        static mut instance: ::protobuf::lazy::Lazy<RequestEcho> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestEcho,
        };
        unsafe {
            instance.get(RequestEcho::new)
        }
    }
}

impl ::protobuf::Clear for RequestEcho {
    fn clear(&mut self) {
        self.clear_message();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestEcho {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestEcho {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestFlush {
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestFlush {
    pub fn new() -> RequestFlush {
        ::std::default::Default::default()
    }
}

impl ::protobuf::Message for RequestFlush {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestFlush {
        RequestFlush::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let fields = ::std::vec::Vec::new();
                ::protobuf::reflect::MessageDescriptor::new::<RequestFlush>(
                    "RequestFlush",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestFlush {
        static mut instance: ::protobuf::lazy::Lazy<RequestFlush> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestFlush,
        };
        unsafe {
            instance.get(RequestFlush::new)
        }
    }
}

impl ::protobuf::Clear for RequestFlush {
    fn clear(&mut self) {
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestFlush {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestFlush {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestInfo {
    // message fields
    pub version: ::std::string::String,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestInfo {
    pub fn new() -> RequestInfo {
        ::std::default::Default::default()
    }

    // string version = 1;

    pub fn clear_version(&mut self) {
        self.version.clear();
    }

    // Param is passed by value, moved
    pub fn set_version(&mut self, v: ::std::string::String) {
        self.version = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_version(&mut self) -> &mut ::std::string::String {
        &mut self.version
    }

    // Take field
    pub fn take_version(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.version, ::std::string::String::new())
    }

    pub fn get_version(&self) -> &str {
        &self.version
    }
}

impl ::protobuf::Message for RequestInfo {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.version)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.version.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.version);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.version.is_empty() {
            os.write_string(1, &self.version)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestInfo {
        RequestInfo::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "version",
                    |m: &RequestInfo| { &m.version },
                    |m: &mut RequestInfo| { &mut m.version },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<RequestInfo>(
                    "RequestInfo",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestInfo {
        static mut instance: ::protobuf::lazy::Lazy<RequestInfo> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestInfo,
        };
        unsafe {
            instance.get(RequestInfo::new)
        }
    }
}

impl ::protobuf::Clear for RequestInfo {
    fn clear(&mut self) {
        self.clear_version();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestInfo {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestInfo {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestSetOption {
    // message fields
    pub key: ::std::string::String,
    pub value: ::std::string::String,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestSetOption {
    pub fn new() -> RequestSetOption {
        ::std::default::Default::default()
    }

    // string key = 1;

    pub fn clear_key(&mut self) {
        self.key.clear();
    }

    // Param is passed by value, moved
    pub fn set_key(&mut self, v: ::std::string::String) {
        self.key = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_key(&mut self) -> &mut ::std::string::String {
        &mut self.key
    }

    // Take field
    pub fn take_key(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.key, ::std::string::String::new())
    }

    pub fn get_key(&self) -> &str {
        &self.key
    }

    // string value = 2;

    pub fn clear_value(&mut self) {
        self.value.clear();
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: ::std::string::String) {
        self.value = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_value(&mut self) -> &mut ::std::string::String {
        &mut self.value
    }

    // Take field
    pub fn take_value(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.value, ::std::string::String::new())
    }

    pub fn get_value(&self) -> &str {
        &self.value
    }
}

impl ::protobuf::Message for RequestSetOption {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.key)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.key.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.key);
        }
        if !self.value.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.value);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.key.is_empty() {
            os.write_string(1, &self.key)?;
        }
        if !self.value.is_empty() {
            os.write_string(2, &self.value)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestSetOption {
        RequestSetOption::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "key",
                    |m: &RequestSetOption| { &m.key },
                    |m: &mut RequestSetOption| { &mut m.key },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "value",
                    |m: &RequestSetOption| { &m.value },
                    |m: &mut RequestSetOption| { &mut m.value },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<RequestSetOption>(
                    "RequestSetOption",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestSetOption {
        static mut instance: ::protobuf::lazy::Lazy<RequestSetOption> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestSetOption,
        };
        unsafe {
            instance.get(RequestSetOption::new)
        }
    }
}

impl ::protobuf::Clear for RequestSetOption {
    fn clear(&mut self) {
        self.clear_key();
        self.clear_value();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestSetOption {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestSetOption {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestInitChain {
    // message fields
    pub time: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
    pub chain_id: ::std::string::String,
    pub consensus_params: ::protobuf::SingularPtrField<ConsensusParams>,
    pub validators: ::protobuf::RepeatedField<ValidatorUpdate>,
    pub app_state_bytes: ::std::vec::Vec<u8>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestInitChain {
    pub fn new() -> RequestInitChain {
        ::std::default::Default::default()
    }

    // .google.protobuf.Timestamp time = 1;

    pub fn clear_time(&mut self) {
        self.time.clear();
    }

    pub fn has_time(&self) -> bool {
        self.time.is_some()
    }

    // Param is passed by value, moved
    pub fn set_time(&mut self, v: ::protobuf::well_known_types::Timestamp) {
        self.time = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_time(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
        if self.time.is_none() {
            self.time.set_default();
        }
        self.time.as_mut().unwrap()
    }

    // Take field
    pub fn take_time(&mut self) -> ::protobuf::well_known_types::Timestamp {
        self.time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
    }

    pub fn get_time(&self) -> &::protobuf::well_known_types::Timestamp {
        self.time.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance())
    }

    // string chain_id = 2;

    pub fn clear_chain_id(&mut self) {
        self.chain_id.clear();
    }

    // Param is passed by value, moved
    pub fn set_chain_id(&mut self, v: ::std::string::String) {
        self.chain_id = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_chain_id(&mut self) -> &mut ::std::string::String {
        &mut self.chain_id
    }

    // Take field
    pub fn take_chain_id(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.chain_id, ::std::string::String::new())
    }

    pub fn get_chain_id(&self) -> &str {
        &self.chain_id
    }

    // .types.ConsensusParams consensus_params = 3;

    pub fn clear_consensus_params(&mut self) {
        self.consensus_params.clear();
    }

    pub fn has_consensus_params(&self) -> bool {
        self.consensus_params.is_some()
    }

    // Param is passed by value, moved
    pub fn set_consensus_params(&mut self, v: ConsensusParams) {
        self.consensus_params = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_consensus_params(&mut self) -> &mut ConsensusParams {
        if self.consensus_params.is_none() {
            self.consensus_params.set_default();
        }
        self.consensus_params.as_mut().unwrap()
    }

    // Take field
    pub fn take_consensus_params(&mut self) -> ConsensusParams {
        self.consensus_params.take().unwrap_or_else(|| ConsensusParams::new())
    }

    pub fn get_consensus_params(&self) -> &ConsensusParams {
        self.consensus_params.as_ref().unwrap_or_else(|| ConsensusParams::default_instance())
    }

    // repeated .types.ValidatorUpdate validators = 4;

    pub fn clear_validators(&mut self) {
        self.validators.clear();
    }

    // Param is passed by value, moved
    pub fn set_validators(&mut self, v: ::protobuf::RepeatedField<ValidatorUpdate>) {
        self.validators = v;
    }

    // Mutable pointer to the field.
    pub fn mut_validators(&mut self) -> &mut ::protobuf::RepeatedField<ValidatorUpdate> {
        &mut self.validators
    }

    // Take field
    pub fn take_validators(&mut self) -> ::protobuf::RepeatedField<ValidatorUpdate> {
        ::std::mem::replace(&mut self.validators, ::protobuf::RepeatedField::new())
    }

    pub fn get_validators(&self) -> &[ValidatorUpdate] {
        &self.validators
    }

    // bytes app_state_bytes = 5;

    pub fn clear_app_state_bytes(&mut self) {
        self.app_state_bytes.clear();
    }

    // Param is passed by value, moved
    pub fn set_app_state_bytes(&mut self, v: ::std::vec::Vec<u8>) {
        self.app_state_bytes = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_app_state_bytes(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.app_state_bytes
    }

    // Take field
    pub fn take_app_state_bytes(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.app_state_bytes, ::std::vec::Vec::new())
    }

    pub fn get_app_state_bytes(&self) -> &[u8] {
        &self.app_state_bytes
    }
}

impl ::protobuf::Message for RequestInitChain {
    fn is_initialized(&self) -> bool {
        for v in &self.time {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.consensus_params {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.validators {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.time)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.chain_id)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.consensus_params)?;
                },
                4 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.validators)?;
                },
                5 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.app_state_bytes)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(ref v) = self.time.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if !self.chain_id.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.chain_id);
        }
        if let Some(ref v) = self.consensus_params.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        for value in &self.validators {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        if !self.app_state_bytes.is_empty() {
            my_size += ::protobuf::rt::bytes_size(5, &self.app_state_bytes);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if let Some(ref v) = self.time.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if !self.chain_id.is_empty() {
            os.write_string(2, &self.chain_id)?;
        }
        if let Some(ref v) = self.consensus_params.as_ref() {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        for v in &self.validators {
            os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        if !self.app_state_bytes.is_empty() {
            os.write_bytes(5, &self.app_state_bytes)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestInitChain {
        RequestInitChain::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
                    "time",
                    |m: &RequestInitChain| { &m.time },
                    |m: &mut RequestInitChain| { &mut m.time },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "chain_id",
                    |m: &RequestInitChain| { &m.chain_id },
                    |m: &mut RequestInitChain| { &mut m.chain_id },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ConsensusParams>>(
                    "consensus_params",
                    |m: &RequestInitChain| { &m.consensus_params },
                    |m: &mut RequestInitChain| { &mut m.consensus_params },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ValidatorUpdate>>(
                    "validators",
                    |m: &RequestInitChain| { &m.validators },
                    |m: &mut RequestInitChain| { &mut m.validators },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "app_state_bytes",
                    |m: &RequestInitChain| { &m.app_state_bytes },
                    |m: &mut RequestInitChain| { &mut m.app_state_bytes },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<RequestInitChain>(
                    "RequestInitChain",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestInitChain {
        static mut instance: ::protobuf::lazy::Lazy<RequestInitChain> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestInitChain,
        };
        unsafe {
            instance.get(RequestInitChain::new)
        }
    }
}

impl ::protobuf::Clear for RequestInitChain {
    fn clear(&mut self) {
        self.clear_time();
        self.clear_chain_id();
        self.clear_consensus_params();
        self.clear_validators();
        self.clear_app_state_bytes();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestInitChain {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestInitChain {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestQuery {
    // message fields
    pub data: ::std::vec::Vec<u8>,
    pub path: ::std::string::String,
    pub height: i64,
    pub prove: bool,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestQuery {
    pub fn new() -> RequestQuery {
        ::std::default::Default::default()
    }

    // bytes data = 1;

    pub fn clear_data(&mut self) {
        self.data.clear();
    }

    // Param is passed by value, moved
    pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
        self.data = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.data
    }

    // Take field
    pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
    }

    pub fn get_data(&self) -> &[u8] {
        &self.data
    }

    // string path = 2;

    pub fn clear_path(&mut self) {
        self.path.clear();
    }

    // Param is passed by value, moved
    pub fn set_path(&mut self, v: ::std::string::String) {
        self.path = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_path(&mut self) -> &mut ::std::string::String {
        &mut self.path
    }

    // Take field
    pub fn take_path(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.path, ::std::string::String::new())
    }

    pub fn get_path(&self) -> &str {
        &self.path
    }

    // int64 height = 3;

    pub fn clear_height(&mut self) {
        self.height = 0;
    }

    // Param is passed by value, moved
    pub fn set_height(&mut self, v: i64) {
        self.height = v;
    }

    pub fn get_height(&self) -> i64 {
        self.height
    }

    // bool prove = 4;

    pub fn clear_prove(&mut self) {
        self.prove = false;
    }

    // Param is passed by value, moved
    pub fn set_prove(&mut self, v: bool) {
        self.prove = v;
    }

    pub fn get_prove(&self) -> bool {
        self.prove
    }
}

impl ::protobuf::Message for RequestQuery {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.path)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.height = tmp;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.prove = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.data.is_empty() {
            my_size += ::protobuf::rt::bytes_size(1, &self.data);
        }
        if !self.path.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.path);
        }
        if self.height != 0 {
            my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.prove != false {
            my_size += 2;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.data.is_empty() {
            os.write_bytes(1, &self.data)?;
        }
        if !self.path.is_empty() {
            os.write_string(2, &self.path)?;
        }
        if self.height != 0 {
            os.write_int64(3, self.height)?;
        }
        if self.prove != false {
            os.write_bool(4, self.prove)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestQuery {
        RequestQuery::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "data",
                    |m: &RequestQuery| { &m.data },
                    |m: &mut RequestQuery| { &mut m.data },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "path",
                    |m: &RequestQuery| { &m.path },
                    |m: &mut RequestQuery| { &mut m.path },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "height",
                    |m: &RequestQuery| { &m.height },
                    |m: &mut RequestQuery| { &mut m.height },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                    "prove",
                    |m: &RequestQuery| { &m.prove },
                    |m: &mut RequestQuery| { &mut m.prove },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<RequestQuery>(
                    "RequestQuery",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestQuery {
        static mut instance: ::protobuf::lazy::Lazy<RequestQuery> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestQuery,
        };
        unsafe {
            instance.get(RequestQuery::new)
        }
    }
}

impl ::protobuf::Clear for RequestQuery {
    fn clear(&mut self) {
        self.clear_data();
        self.clear_path();
        self.clear_height();
        self.clear_prove();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestQuery {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestQuery {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestBeginBlock {
    // message fields
    pub hash: ::std::vec::Vec<u8>,
    pub header: ::protobuf::SingularPtrField<Header>,
    pub last_commit_info: ::protobuf::SingularPtrField<LastCommitInfo>,
    pub byzantine_validators: ::protobuf::RepeatedField<Evidence>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestBeginBlock {
    pub fn new() -> RequestBeginBlock {
        ::std::default::Default::default()
    }

    // bytes hash = 1;

    pub fn clear_hash(&mut self) {
        self.hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.hash
    }

    // Take field
    pub fn take_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.hash, ::std::vec::Vec::new())
    }

    pub fn get_hash(&self) -> &[u8] {
        &self.hash
    }

    // .types.Header header = 2;

    pub fn clear_header(&mut self) {
        self.header.clear();
    }

    pub fn has_header(&self) -> bool {
        self.header.is_some()
    }

    // Param is passed by value, moved
    pub fn set_header(&mut self, v: Header) {
        self.header = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_header(&mut self) -> &mut Header {
        if self.header.is_none() {
            self.header.set_default();
        }
        self.header.as_mut().unwrap()
    }

    // Take field
    pub fn take_header(&mut self) -> Header {
        self.header.take().unwrap_or_else(|| Header::new())
    }

    pub fn get_header(&self) -> &Header {
        self.header.as_ref().unwrap_or_else(|| Header::default_instance())
    }

    // .types.LastCommitInfo last_commit_info = 3;

    pub fn clear_last_commit_info(&mut self) {
        self.last_commit_info.clear();
    }

    pub fn has_last_commit_info(&self) -> bool {
        self.last_commit_info.is_some()
    }

    // Param is passed by value, moved
    pub fn set_last_commit_info(&mut self, v: LastCommitInfo) {
        self.last_commit_info = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_last_commit_info(&mut self) -> &mut LastCommitInfo {
        if self.last_commit_info.is_none() {
            self.last_commit_info.set_default();
        }
        self.last_commit_info.as_mut().unwrap()
    }

    // Take field
    pub fn take_last_commit_info(&mut self) -> LastCommitInfo {
        self.last_commit_info.take().unwrap_or_else(|| LastCommitInfo::new())
    }

    pub fn get_last_commit_info(&self) -> &LastCommitInfo {
        self.last_commit_info.as_ref().unwrap_or_else(|| LastCommitInfo::default_instance())
    }

    // repeated .types.Evidence byzantine_validators = 4;

    pub fn clear_byzantine_validators(&mut self) {
        self.byzantine_validators.clear();
    }

    // Param is passed by value, moved
    pub fn set_byzantine_validators(&mut self, v: ::protobuf::RepeatedField<Evidence>) {
        self.byzantine_validators = v;
    }

    // Mutable pointer to the field.
    pub fn mut_byzantine_validators(&mut self) -> &mut ::protobuf::RepeatedField<Evidence> {
        &mut self.byzantine_validators
    }

    // Take field
    pub fn take_byzantine_validators(&mut self) -> ::protobuf::RepeatedField<Evidence> {
        ::std::mem::replace(&mut self.byzantine_validators, ::protobuf::RepeatedField::new())
    }

    pub fn get_byzantine_validators(&self) -> &[Evidence] {
        &self.byzantine_validators
    }
}

impl ::protobuf::Message for RequestBeginBlock {
    fn is_initialized(&self) -> bool {
        for v in &self.header {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.last_commit_info {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.byzantine_validators {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.hash)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.header)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.last_commit_info)?;
                },
                4 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.byzantine_validators)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(1, &self.hash);
        }
        if let Some(ref v) = self.header.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.last_commit_info.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        for value in &self.byzantine_validators {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.hash.is_empty() {
            os.write_bytes(1, &self.hash)?;
        }
        if let Some(ref v) = self.header.as_ref() {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.last_commit_info.as_ref() {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        for v in &self.byzantine_validators {
            os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestBeginBlock {
        RequestBeginBlock::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "hash",
                    |m: &RequestBeginBlock| { &m.hash },
                    |m: &mut RequestBeginBlock| { &mut m.hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Header>>(
                    "header",
                    |m: &RequestBeginBlock| { &m.header },
                    |m: &mut RequestBeginBlock| { &mut m.header },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LastCommitInfo>>(
                    "last_commit_info",
                    |m: &RequestBeginBlock| { &m.last_commit_info },
                    |m: &mut RequestBeginBlock| { &mut m.last_commit_info },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Evidence>>(
                    "byzantine_validators",
                    |m: &RequestBeginBlock| { &m.byzantine_validators },
                    |m: &mut RequestBeginBlock| { &mut m.byzantine_validators },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<RequestBeginBlock>(
                    "RequestBeginBlock",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestBeginBlock {
        static mut instance: ::protobuf::lazy::Lazy<RequestBeginBlock> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestBeginBlock,
        };
        unsafe {
            instance.get(RequestBeginBlock::new)
        }
    }
}

impl ::protobuf::Clear for RequestBeginBlock {
    fn clear(&mut self) {
        self.clear_hash();
        self.clear_header();
        self.clear_last_commit_info();
        self.clear_byzantine_validators();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestBeginBlock {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestBeginBlock {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestCheckTx {
    // message fields
    pub tx: ::std::vec::Vec<u8>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestCheckTx {
    pub fn new() -> RequestCheckTx {
        ::std::default::Default::default()
    }

    // bytes tx = 1;

    pub fn clear_tx(&mut self) {
        self.tx.clear();
    }

    // Param is passed by value, moved
    pub fn set_tx(&mut self, v: ::std::vec::Vec<u8>) {
        self.tx = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_tx(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.tx
    }

    // Take field
    pub fn take_tx(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.tx, ::std::vec::Vec::new())
    }

    pub fn get_tx(&self) -> &[u8] {
        &self.tx
    }
}

impl ::protobuf::Message for RequestCheckTx {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.tx)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.tx.is_empty() {
            my_size += ::protobuf::rt::bytes_size(1, &self.tx);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.tx.is_empty() {
            os.write_bytes(1, &self.tx)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestCheckTx {
        RequestCheckTx::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "tx",
                    |m: &RequestCheckTx| { &m.tx },
                    |m: &mut RequestCheckTx| { &mut m.tx },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<RequestCheckTx>(
                    "RequestCheckTx",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestCheckTx {
        static mut instance: ::protobuf::lazy::Lazy<RequestCheckTx> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestCheckTx,
        };
        unsafe {
            instance.get(RequestCheckTx::new)
        }
    }
}

impl ::protobuf::Clear for RequestCheckTx {
    fn clear(&mut self) {
        self.clear_tx();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestCheckTx {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestCheckTx {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestDeliverTx {
    // message fields
    pub tx: ::std::vec::Vec<u8>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestDeliverTx {
    pub fn new() -> RequestDeliverTx {
        ::std::default::Default::default()
    }

    // bytes tx = 1;

    pub fn clear_tx(&mut self) {
        self.tx.clear();
    }

    // Param is passed by value, moved
    pub fn set_tx(&mut self, v: ::std::vec::Vec<u8>) {
        self.tx = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_tx(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.tx
    }

    // Take field
    pub fn take_tx(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.tx, ::std::vec::Vec::new())
    }

    pub fn get_tx(&self) -> &[u8] {
        &self.tx
    }
}

impl ::protobuf::Message for RequestDeliverTx {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.tx)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.tx.is_empty() {
            my_size += ::protobuf::rt::bytes_size(1, &self.tx);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.tx.is_empty() {
            os.write_bytes(1, &self.tx)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestDeliverTx {
        RequestDeliverTx::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "tx",
                    |m: &RequestDeliverTx| { &m.tx },
                    |m: &mut RequestDeliverTx| { &mut m.tx },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<RequestDeliverTx>(
                    "RequestDeliverTx",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestDeliverTx {
        static mut instance: ::protobuf::lazy::Lazy<RequestDeliverTx> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestDeliverTx,
        };
        unsafe {
            instance.get(RequestDeliverTx::new)
        }
    }
}

impl ::protobuf::Clear for RequestDeliverTx {
    fn clear(&mut self) {
        self.clear_tx();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestDeliverTx {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestDeliverTx {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestEndBlock {
    // message fields
    pub height: i64,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestEndBlock {
    pub fn new() -> RequestEndBlock {
        ::std::default::Default::default()
    }

    // int64 height = 1;

    pub fn clear_height(&mut self) {
        self.height = 0;
    }

    // Param is passed by value, moved
    pub fn set_height(&mut self, v: i64) {
        self.height = v;
    }

    pub fn get_height(&self) -> i64 {
        self.height
    }
}

impl ::protobuf::Message for RequestEndBlock {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.height = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.height != 0 {
            my_size += ::protobuf::rt::value_size(1, self.height, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.height != 0 {
            os.write_int64(1, self.height)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestEndBlock {
        RequestEndBlock::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "height",
                    |m: &RequestEndBlock| { &m.height },
                    |m: &mut RequestEndBlock| { &mut m.height },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<RequestEndBlock>(
                    "RequestEndBlock",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestEndBlock {
        static mut instance: ::protobuf::lazy::Lazy<RequestEndBlock> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestEndBlock,
        };
        unsafe {
            instance.get(RequestEndBlock::new)
        }
    }
}

impl ::protobuf::Clear for RequestEndBlock {
    fn clear(&mut self) {
        self.clear_height();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestEndBlock {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestEndBlock {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RequestCommit {
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl RequestCommit {
    pub fn new() -> RequestCommit {
        ::std::default::Default::default()
    }
}

impl ::protobuf::Message for RequestCommit {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RequestCommit {
        RequestCommit::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let fields = ::std::vec::Vec::new();
                ::protobuf::reflect::MessageDescriptor::new::<RequestCommit>(
                    "RequestCommit",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static RequestCommit {
        static mut instance: ::protobuf::lazy::Lazy<RequestCommit> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const RequestCommit,
        };
        unsafe {
            instance.get(RequestCommit::new)
        }
    }
}

impl ::protobuf::Clear for RequestCommit {
    fn clear(&mut self) {
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RequestCommit {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RequestCommit {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct Response {
    // message oneof groups
    pub value: ::std::option::Option<Response_oneof_value>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

#[derive(Clone,PartialEq)]
pub enum Response_oneof_value {
    exception(ResponseException),
    echo(ResponseEcho),
    flush(ResponseFlush),
    info(ResponseInfo),
    set_option(ResponseSetOption),
    init_chain(ResponseInitChain),
    query(ResponseQuery),
    begin_block(ResponseBeginBlock),
    check_tx(ResponseCheckTx),
    deliver_tx(ResponseDeliverTx),
    end_block(ResponseEndBlock),
    commit(ResponseCommit),
}

impl Response {
    pub fn new() -> Response {
        ::std::default::Default::default()
    }

    // .types.ResponseException exception = 1;

    pub fn clear_exception(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_exception(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::exception(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_exception(&mut self, v: ResponseException) {
        self.value = ::std::option::Option::Some(Response_oneof_value::exception(v))
    }

    // Mutable pointer to the field.
    pub fn mut_exception(&mut self) -> &mut ResponseException {
        if let ::std::option::Option::Some(Response_oneof_value::exception(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::exception(ResponseException::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::exception(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_exception(&mut self) -> ResponseException {
        if self.has_exception() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::exception(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseException::new()
        }
    }

    pub fn get_exception(&self) -> &ResponseException {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::exception(ref v)) => v,
            _ => ResponseException::default_instance(),
        }
    }

    // .types.ResponseEcho echo = 2;

    pub fn clear_echo(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_echo(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::echo(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_echo(&mut self, v: ResponseEcho) {
        self.value = ::std::option::Option::Some(Response_oneof_value::echo(v))
    }

    // Mutable pointer to the field.
    pub fn mut_echo(&mut self) -> &mut ResponseEcho {
        if let ::std::option::Option::Some(Response_oneof_value::echo(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::echo(ResponseEcho::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::echo(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_echo(&mut self) -> ResponseEcho {
        if self.has_echo() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::echo(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseEcho::new()
        }
    }

    pub fn get_echo(&self) -> &ResponseEcho {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::echo(ref v)) => v,
            _ => ResponseEcho::default_instance(),
        }
    }

    // .types.ResponseFlush flush = 3;

    pub fn clear_flush(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_flush(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::flush(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_flush(&mut self, v: ResponseFlush) {
        self.value = ::std::option::Option::Some(Response_oneof_value::flush(v))
    }

    // Mutable pointer to the field.
    pub fn mut_flush(&mut self) -> &mut ResponseFlush {
        if let ::std::option::Option::Some(Response_oneof_value::flush(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::flush(ResponseFlush::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::flush(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_flush(&mut self) -> ResponseFlush {
        if self.has_flush() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::flush(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseFlush::new()
        }
    }

    pub fn get_flush(&self) -> &ResponseFlush {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::flush(ref v)) => v,
            _ => ResponseFlush::default_instance(),
        }
    }

    // .types.ResponseInfo info = 4;

    pub fn clear_info(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_info(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::info(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_info(&mut self, v: ResponseInfo) {
        self.value = ::std::option::Option::Some(Response_oneof_value::info(v))
    }

    // Mutable pointer to the field.
    pub fn mut_info(&mut self) -> &mut ResponseInfo {
        if let ::std::option::Option::Some(Response_oneof_value::info(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::info(ResponseInfo::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::info(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_info(&mut self) -> ResponseInfo {
        if self.has_info() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::info(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseInfo::new()
        }
    }

    pub fn get_info(&self) -> &ResponseInfo {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::info(ref v)) => v,
            _ => ResponseInfo::default_instance(),
        }
    }

    // .types.ResponseSetOption set_option = 5;

    pub fn clear_set_option(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_set_option(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::set_option(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_set_option(&mut self, v: ResponseSetOption) {
        self.value = ::std::option::Option::Some(Response_oneof_value::set_option(v))
    }

    // Mutable pointer to the field.
    pub fn mut_set_option(&mut self) -> &mut ResponseSetOption {
        if let ::std::option::Option::Some(Response_oneof_value::set_option(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::set_option(ResponseSetOption::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::set_option(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_set_option(&mut self) -> ResponseSetOption {
        if self.has_set_option() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::set_option(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseSetOption::new()
        }
    }

    pub fn get_set_option(&self) -> &ResponseSetOption {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::set_option(ref v)) => v,
            _ => ResponseSetOption::default_instance(),
        }
    }

    // .types.ResponseInitChain init_chain = 6;

    pub fn clear_init_chain(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_init_chain(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::init_chain(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_init_chain(&mut self, v: ResponseInitChain) {
        self.value = ::std::option::Option::Some(Response_oneof_value::init_chain(v))
    }

    // Mutable pointer to the field.
    pub fn mut_init_chain(&mut self) -> &mut ResponseInitChain {
        if let ::std::option::Option::Some(Response_oneof_value::init_chain(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::init_chain(ResponseInitChain::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::init_chain(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_init_chain(&mut self) -> ResponseInitChain {
        if self.has_init_chain() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::init_chain(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseInitChain::new()
        }
    }

    pub fn get_init_chain(&self) -> &ResponseInitChain {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::init_chain(ref v)) => v,
            _ => ResponseInitChain::default_instance(),
        }
    }

    // .types.ResponseQuery query = 7;

    pub fn clear_query(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_query(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::query(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_query(&mut self, v: ResponseQuery) {
        self.value = ::std::option::Option::Some(Response_oneof_value::query(v))
    }

    // Mutable pointer to the field.
    pub fn mut_query(&mut self) -> &mut ResponseQuery {
        if let ::std::option::Option::Some(Response_oneof_value::query(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::query(ResponseQuery::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::query(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_query(&mut self) -> ResponseQuery {
        if self.has_query() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::query(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseQuery::new()
        }
    }

    pub fn get_query(&self) -> &ResponseQuery {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::query(ref v)) => v,
            _ => ResponseQuery::default_instance(),
        }
    }

    // .types.ResponseBeginBlock begin_block = 8;

    pub fn clear_begin_block(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_begin_block(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::begin_block(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_begin_block(&mut self, v: ResponseBeginBlock) {
        self.value = ::std::option::Option::Some(Response_oneof_value::begin_block(v))
    }

    // Mutable pointer to the field.
    pub fn mut_begin_block(&mut self) -> &mut ResponseBeginBlock {
        if let ::std::option::Option::Some(Response_oneof_value::begin_block(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::begin_block(ResponseBeginBlock::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::begin_block(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_begin_block(&mut self) -> ResponseBeginBlock {
        if self.has_begin_block() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::begin_block(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseBeginBlock::new()
        }
    }

    pub fn get_begin_block(&self) -> &ResponseBeginBlock {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::begin_block(ref v)) => v,
            _ => ResponseBeginBlock::default_instance(),
        }
    }

    // .types.ResponseCheckTx check_tx = 9;

    pub fn clear_check_tx(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_check_tx(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::check_tx(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_check_tx(&mut self, v: ResponseCheckTx) {
        self.value = ::std::option::Option::Some(Response_oneof_value::check_tx(v))
    }

    // Mutable pointer to the field.
    pub fn mut_check_tx(&mut self) -> &mut ResponseCheckTx {
        if let ::std::option::Option::Some(Response_oneof_value::check_tx(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::check_tx(ResponseCheckTx::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::check_tx(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_check_tx(&mut self) -> ResponseCheckTx {
        if self.has_check_tx() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::check_tx(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseCheckTx::new()
        }
    }

    pub fn get_check_tx(&self) -> &ResponseCheckTx {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::check_tx(ref v)) => v,
            _ => ResponseCheckTx::default_instance(),
        }
    }

    // .types.ResponseDeliverTx deliver_tx = 10;

    pub fn clear_deliver_tx(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_deliver_tx(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::deliver_tx(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_deliver_tx(&mut self, v: ResponseDeliverTx) {
        self.value = ::std::option::Option::Some(Response_oneof_value::deliver_tx(v))
    }

    // Mutable pointer to the field.
    pub fn mut_deliver_tx(&mut self) -> &mut ResponseDeliverTx {
        if let ::std::option::Option::Some(Response_oneof_value::deliver_tx(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::deliver_tx(ResponseDeliverTx::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::deliver_tx(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_deliver_tx(&mut self) -> ResponseDeliverTx {
        if self.has_deliver_tx() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::deliver_tx(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseDeliverTx::new()
        }
    }

    pub fn get_deliver_tx(&self) -> &ResponseDeliverTx {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::deliver_tx(ref v)) => v,
            _ => ResponseDeliverTx::default_instance(),
        }
    }

    // .types.ResponseEndBlock end_block = 11;

    pub fn clear_end_block(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_end_block(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::end_block(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_end_block(&mut self, v: ResponseEndBlock) {
        self.value = ::std::option::Option::Some(Response_oneof_value::end_block(v))
    }

    // Mutable pointer to the field.
    pub fn mut_end_block(&mut self) -> &mut ResponseEndBlock {
        if let ::std::option::Option::Some(Response_oneof_value::end_block(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::end_block(ResponseEndBlock::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::end_block(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_end_block(&mut self) -> ResponseEndBlock {
        if self.has_end_block() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::end_block(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseEndBlock::new()
        }
    }

    pub fn get_end_block(&self) -> &ResponseEndBlock {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::end_block(ref v)) => v,
            _ => ResponseEndBlock::default_instance(),
        }
    }

    // .types.ResponseCommit commit = 12;

    pub fn clear_commit(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_commit(&self) -> bool {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::commit(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_commit(&mut self, v: ResponseCommit) {
        self.value = ::std::option::Option::Some(Response_oneof_value::commit(v))
    }

    // Mutable pointer to the field.
    pub fn mut_commit(&mut self) -> &mut ResponseCommit {
        if let ::std::option::Option::Some(Response_oneof_value::commit(_)) = self.value {
        } else {
            self.value = ::std::option::Option::Some(Response_oneof_value::commit(ResponseCommit::new()));
        }
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::commit(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_commit(&mut self) -> ResponseCommit {
        if self.has_commit() {
            match self.value.take() {
                ::std::option::Option::Some(Response_oneof_value::commit(v)) => v,
                _ => panic!(),
            }
        } else {
            ResponseCommit::new()
        }
    }

    pub fn get_commit(&self) -> &ResponseCommit {
        match self.value {
            ::std::option::Option::Some(Response_oneof_value::commit(ref v)) => v,
            _ => ResponseCommit::default_instance(),
        }
    }
}

impl ::protobuf::Message for Response {
    fn is_initialized(&self) -> bool {
        if let Some(Response_oneof_value::exception(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::echo(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::flush(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::info(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::set_option(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::init_chain(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::query(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::begin_block(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::check_tx(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::deliver_tx(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::end_block(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Response_oneof_value::commit(ref v)) = self.value {
            if !v.is_initialized() {
                return false;
            }
        }
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::exception(is.read_message()?));
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::echo(is.read_message()?));
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::flush(is.read_message()?));
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::info(is.read_message()?));
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::set_option(is.read_message()?));
                },
                6 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::init_chain(is.read_message()?));
                },
                7 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::query(is.read_message()?));
                },
                8 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::begin_block(is.read_message()?));
                },
                9 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::check_tx(is.read_message()?));
                },
                10 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::deliver_tx(is.read_message()?));
                },
                11 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::end_block(is.read_message()?));
                },
                12 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.value = ::std::option::Option::Some(Response_oneof_value::commit(is.read_message()?));
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let ::std::option::Option::Some(ref v) = self.value {
            match v {
                &Response_oneof_value::exception(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::echo(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::flush(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::info(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::set_option(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::init_chain(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::query(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::begin_block(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::check_tx(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::deliver_tx(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::end_block(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Response_oneof_value::commit(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
            };
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if let ::std::option::Option::Some(ref v) = self.value {
            match v {
                &Response_oneof_value::exception(ref v) => {
                    os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::echo(ref v) => {
                    os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::flush(ref v) => {
                    os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::info(ref v) => {
                    os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::set_option(ref v) => {
                    os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::init_chain(ref v) => {
                    os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::query(ref v) => {
                    os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::begin_block(ref v) => {
                    os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::check_tx(ref v) => {
                    os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::deliver_tx(ref v) => {
                    os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::end_block(ref v) => {
                    os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Response_oneof_value::commit(ref v) => {
                    os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
            };
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> Response {
        Response::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseException>(
                    "exception",
                    Response::has_exception,
                    Response::get_exception,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseEcho>(
                    "echo",
                    Response::has_echo,
                    Response::get_echo,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseFlush>(
                    "flush",
                    Response::has_flush,
                    Response::get_flush,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseInfo>(
                    "info",
                    Response::has_info,
                    Response::get_info,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseSetOption>(
                    "set_option",
                    Response::has_set_option,
                    Response::get_set_option,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseInitChain>(
                    "init_chain",
                    Response::has_init_chain,
                    Response::get_init_chain,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseQuery>(
                    "query",
                    Response::has_query,
                    Response::get_query,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseBeginBlock>(
                    "begin_block",
                    Response::has_begin_block,
                    Response::get_begin_block,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseCheckTx>(
                    "check_tx",
                    Response::has_check_tx,
                    Response::get_check_tx,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseDeliverTx>(
                    "deliver_tx",
                    Response::has_deliver_tx,
                    Response::get_deliver_tx,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseEndBlock>(
                    "end_block",
                    Response::has_end_block,
                    Response::get_end_block,
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseCommit>(
                    "commit",
                    Response::has_commit,
                    Response::get_commit,
                ));
                ::protobuf::reflect::MessageDescriptor::new::<Response>(
                    "Response",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static Response {
        static mut instance: ::protobuf::lazy::Lazy<Response> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const Response,
        };
        unsafe {
            instance.get(Response::new)
        }
    }
}

impl ::protobuf::Clear for Response {
    fn clear(&mut self) {
        self.clear_exception();
        self.clear_echo();
        self.clear_flush();
        self.clear_info();
        self.clear_set_option();
        self.clear_init_chain();
        self.clear_query();
        self.clear_begin_block();
        self.clear_check_tx();
        self.clear_deliver_tx();
        self.clear_end_block();
        self.clear_commit();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for Response {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Response {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseException {
    // message fields
    pub error: ::std::string::String,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseException {
    pub fn new() -> ResponseException {
        ::std::default::Default::default()
    }

    // string error = 1;

    pub fn clear_error(&mut self) {
        self.error.clear();
    }

    // Param is passed by value, moved
    pub fn set_error(&mut self, v: ::std::string::String) {
        self.error = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_error(&mut self) -> &mut ::std::string::String {
        &mut self.error
    }

    // Take field
    pub fn take_error(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.error, ::std::string::String::new())
    }

    pub fn get_error(&self) -> &str {
        &self.error
    }
}

impl ::protobuf::Message for ResponseException {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.error)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.error.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.error);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.error.is_empty() {
            os.write_string(1, &self.error)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseException {
        ResponseException::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "error",
                    |m: &ResponseException| { &m.error },
                    |m: &mut ResponseException| { &mut m.error },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseException>(
                    "ResponseException",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseException {
        static mut instance: ::protobuf::lazy::Lazy<ResponseException> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseException,
        };
        unsafe {
            instance.get(ResponseException::new)
        }
    }
}

impl ::protobuf::Clear for ResponseException {
    fn clear(&mut self) {
        self.clear_error();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseException {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseException {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseEcho {
    // message fields
    pub message: ::std::string::String,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseEcho {
    pub fn new() -> ResponseEcho {
        ::std::default::Default::default()
    }

    // string message = 1;

    pub fn clear_message(&mut self) {
        self.message.clear();
    }

    // Param is passed by value, moved
    pub fn set_message(&mut self, v: ::std::string::String) {
        self.message = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_message(&mut self) -> &mut ::std::string::String {
        &mut self.message
    }

    // Take field
    pub fn take_message(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.message, ::std::string::String::new())
    }

    pub fn get_message(&self) -> &str {
        &self.message
    }
}

impl ::protobuf::Message for ResponseEcho {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.message)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.message.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.message);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.message.is_empty() {
            os.write_string(1, &self.message)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseEcho {
        ResponseEcho::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "message",
                    |m: &ResponseEcho| { &m.message },
                    |m: &mut ResponseEcho| { &mut m.message },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseEcho>(
                    "ResponseEcho",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseEcho {
        static mut instance: ::protobuf::lazy::Lazy<ResponseEcho> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseEcho,
        };
        unsafe {
            instance.get(ResponseEcho::new)
        }
    }
}

impl ::protobuf::Clear for ResponseEcho {
    fn clear(&mut self) {
        self.clear_message();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseEcho {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseEcho {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseFlush {
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseFlush {
    pub fn new() -> ResponseFlush {
        ::std::default::Default::default()
    }
}

impl ::protobuf::Message for ResponseFlush {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseFlush {
        ResponseFlush::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let fields = ::std::vec::Vec::new();
                ::protobuf::reflect::MessageDescriptor::new::<ResponseFlush>(
                    "ResponseFlush",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseFlush {
        static mut instance: ::protobuf::lazy::Lazy<ResponseFlush> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseFlush,
        };
        unsafe {
            instance.get(ResponseFlush::new)
        }
    }
}

impl ::protobuf::Clear for ResponseFlush {
    fn clear(&mut self) {
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseFlush {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseFlush {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseInfo {
    // message fields
    pub data: ::std::string::String,
    pub version: ::std::string::String,
    pub last_block_height: i64,
    pub last_block_app_hash: ::std::vec::Vec<u8>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseInfo {
    pub fn new() -> ResponseInfo {
        ::std::default::Default::default()
    }

    // string data = 1;

    pub fn clear_data(&mut self) {
        self.data.clear();
    }

    // Param is passed by value, moved
    pub fn set_data(&mut self, v: ::std::string::String) {
        self.data = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_data(&mut self) -> &mut ::std::string::String {
        &mut self.data
    }

    // Take field
    pub fn take_data(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.data, ::std::string::String::new())
    }

    pub fn get_data(&self) -> &str {
        &self.data
    }

    // string version = 2;

    pub fn clear_version(&mut self) {
        self.version.clear();
    }

    // Param is passed by value, moved
    pub fn set_version(&mut self, v: ::std::string::String) {
        self.version = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_version(&mut self) -> &mut ::std::string::String {
        &mut self.version
    }

    // Take field
    pub fn take_version(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.version, ::std::string::String::new())
    }

    pub fn get_version(&self) -> &str {
        &self.version
    }

    // int64 last_block_height = 3;

    pub fn clear_last_block_height(&mut self) {
        self.last_block_height = 0;
    }

    // Param is passed by value, moved
    pub fn set_last_block_height(&mut self, v: i64) {
        self.last_block_height = v;
    }

    pub fn get_last_block_height(&self) -> i64 {
        self.last_block_height
    }

    // bytes last_block_app_hash = 4;

    pub fn clear_last_block_app_hash(&mut self) {
        self.last_block_app_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_last_block_app_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.last_block_app_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_last_block_app_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.last_block_app_hash
    }

    // Take field
    pub fn take_last_block_app_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.last_block_app_hash, ::std::vec::Vec::new())
    }

    pub fn get_last_block_app_hash(&self) -> &[u8] {
        &self.last_block_app_hash
    }
}

impl ::protobuf::Message for ResponseInfo {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.data)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.version)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.last_block_height = tmp;
                },
                4 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.last_block_app_hash)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.data.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.data);
        }
        if !self.version.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.version);
        }
        if self.last_block_height != 0 {
            my_size += ::protobuf::rt::value_size(3, self.last_block_height, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.last_block_app_hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(4, &self.last_block_app_hash);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.data.is_empty() {
            os.write_string(1, &self.data)?;
        }
        if !self.version.is_empty() {
            os.write_string(2, &self.version)?;
        }
        if self.last_block_height != 0 {
            os.write_int64(3, self.last_block_height)?;
        }
        if !self.last_block_app_hash.is_empty() {
            os.write_bytes(4, &self.last_block_app_hash)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseInfo {
        ResponseInfo::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "data",
                    |m: &ResponseInfo| { &m.data },
                    |m: &mut ResponseInfo| { &mut m.data },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "version",
                    |m: &ResponseInfo| { &m.version },
                    |m: &mut ResponseInfo| { &mut m.version },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "last_block_height",
                    |m: &ResponseInfo| { &m.last_block_height },
                    |m: &mut ResponseInfo| { &mut m.last_block_height },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "last_block_app_hash",
                    |m: &ResponseInfo| { &m.last_block_app_hash },
                    |m: &mut ResponseInfo| { &mut m.last_block_app_hash },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseInfo>(
                    "ResponseInfo",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseInfo {
        static mut instance: ::protobuf::lazy::Lazy<ResponseInfo> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseInfo,
        };
        unsafe {
            instance.get(ResponseInfo::new)
        }
    }
}

impl ::protobuf::Clear for ResponseInfo {
    fn clear(&mut self) {
        self.clear_data();
        self.clear_version();
        self.clear_last_block_height();
        self.clear_last_block_app_hash();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseInfo {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseInfo {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseSetOption {
    // message fields
    pub code: u32,
    pub log: ::std::string::String,
    pub info: ::std::string::String,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseSetOption {
    pub fn new() -> ResponseSetOption {
        ::std::default::Default::default()
    }

    // uint32 code = 1;

    pub fn clear_code(&mut self) {
        self.code = 0;
    }

    // Param is passed by value, moved
    pub fn set_code(&mut self, v: u32) {
        self.code = v;
    }

    pub fn get_code(&self) -> u32 {
        self.code
    }

    // string log = 3;

    pub fn clear_log(&mut self) {
        self.log.clear();
    }

    // Param is passed by value, moved
    pub fn set_log(&mut self, v: ::std::string::String) {
        self.log = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_log(&mut self) -> &mut ::std::string::String {
        &mut self.log
    }

    // Take field
    pub fn take_log(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.log, ::std::string::String::new())
    }

    pub fn get_log(&self) -> &str {
        &self.log
    }

    // string info = 4;

    pub fn clear_info(&mut self) {
        self.info.clear();
    }

    // Param is passed by value, moved
    pub fn set_info(&mut self, v: ::std::string::String) {
        self.info = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_info(&mut self) -> &mut ::std::string::String {
        &mut self.info
    }

    // Take field
    pub fn take_info(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.info, ::std::string::String::new())
    }

    pub fn get_info(&self) -> &str {
        &self.info
    }
}

impl ::protobuf::Message for ResponseSetOption {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.code = tmp;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.code != 0 {
            my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.log.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.log);
        }
        if !self.info.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.info);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.code != 0 {
            os.write_uint32(1, self.code)?;
        }
        if !self.log.is_empty() {
            os.write_string(3, &self.log)?;
        }
        if !self.info.is_empty() {
            os.write_string(4, &self.info)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseSetOption {
        ResponseSetOption::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                    "code",
                    |m: &ResponseSetOption| { &m.code },
                    |m: &mut ResponseSetOption| { &mut m.code },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "log",
                    |m: &ResponseSetOption| { &m.log },
                    |m: &mut ResponseSetOption| { &mut m.log },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "info",
                    |m: &ResponseSetOption| { &m.info },
                    |m: &mut ResponseSetOption| { &mut m.info },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseSetOption>(
                    "ResponseSetOption",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseSetOption {
        static mut instance: ::protobuf::lazy::Lazy<ResponseSetOption> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseSetOption,
        };
        unsafe {
            instance.get(ResponseSetOption::new)
        }
    }
}

impl ::protobuf::Clear for ResponseSetOption {
    fn clear(&mut self) {
        self.clear_code();
        self.clear_log();
        self.clear_info();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseSetOption {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseSetOption {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseInitChain {
    // message fields
    pub consensus_params: ::protobuf::SingularPtrField<ConsensusParams>,
    pub validators: ::protobuf::RepeatedField<ValidatorUpdate>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseInitChain {
    pub fn new() -> ResponseInitChain {
        ::std::default::Default::default()
    }

    // .types.ConsensusParams consensus_params = 1;

    pub fn clear_consensus_params(&mut self) {
        self.consensus_params.clear();
    }

    pub fn has_consensus_params(&self) -> bool {
        self.consensus_params.is_some()
    }

    // Param is passed by value, moved
    pub fn set_consensus_params(&mut self, v: ConsensusParams) {
        self.consensus_params = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_consensus_params(&mut self) -> &mut ConsensusParams {
        if self.consensus_params.is_none() {
            self.consensus_params.set_default();
        }
        self.consensus_params.as_mut().unwrap()
    }

    // Take field
    pub fn take_consensus_params(&mut self) -> ConsensusParams {
        self.consensus_params.take().unwrap_or_else(|| ConsensusParams::new())
    }

    pub fn get_consensus_params(&self) -> &ConsensusParams {
        self.consensus_params.as_ref().unwrap_or_else(|| ConsensusParams::default_instance())
    }

    // repeated .types.ValidatorUpdate validators = 2;

    pub fn clear_validators(&mut self) {
        self.validators.clear();
    }

    // Param is passed by value, moved
    pub fn set_validators(&mut self, v: ::protobuf::RepeatedField<ValidatorUpdate>) {
        self.validators = v;
    }

    // Mutable pointer to the field.
    pub fn mut_validators(&mut self) -> &mut ::protobuf::RepeatedField<ValidatorUpdate> {
        &mut self.validators
    }

    // Take field
    pub fn take_validators(&mut self) -> ::protobuf::RepeatedField<ValidatorUpdate> {
        ::std::mem::replace(&mut self.validators, ::protobuf::RepeatedField::new())
    }

    pub fn get_validators(&self) -> &[ValidatorUpdate] {
        &self.validators
    }
}

impl ::protobuf::Message for ResponseInitChain {
    fn is_initialized(&self) -> bool {
        for v in &self.consensus_params {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.validators {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.consensus_params)?;
                },
                2 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.validators)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(ref v) = self.consensus_params.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        for value in &self.validators {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if let Some(ref v) = self.consensus_params.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        for v in &self.validators {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseInitChain {
        ResponseInitChain::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ConsensusParams>>(
                    "consensus_params",
                    |m: &ResponseInitChain| { &m.consensus_params },
                    |m: &mut ResponseInitChain| { &mut m.consensus_params },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ValidatorUpdate>>(
                    "validators",
                    |m: &ResponseInitChain| { &m.validators },
                    |m: &mut ResponseInitChain| { &mut m.validators },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseInitChain>(
                    "ResponseInitChain",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseInitChain {
        static mut instance: ::protobuf::lazy::Lazy<ResponseInitChain> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseInitChain,
        };
        unsafe {
            instance.get(ResponseInitChain::new)
        }
    }
}

impl ::protobuf::Clear for ResponseInitChain {
    fn clear(&mut self) {
        self.clear_consensus_params();
        self.clear_validators();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseInitChain {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseInitChain {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseQuery {
    // message fields
    pub code: u32,
    pub log: ::std::string::String,
    pub info: ::std::string::String,
    pub index: i64,
    pub key: ::std::vec::Vec<u8>,
    pub value: ::std::vec::Vec<u8>,
    pub proof: ::std::vec::Vec<u8>,
    pub height: i64,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseQuery {
    pub fn new() -> ResponseQuery {
        ::std::default::Default::default()
    }

    // uint32 code = 1;

    pub fn clear_code(&mut self) {
        self.code = 0;
    }

    // Param is passed by value, moved
    pub fn set_code(&mut self, v: u32) {
        self.code = v;
    }

    pub fn get_code(&self) -> u32 {
        self.code
    }

    // string log = 3;

    pub fn clear_log(&mut self) {
        self.log.clear();
    }

    // Param is passed by value, moved
    pub fn set_log(&mut self, v: ::std::string::String) {
        self.log = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_log(&mut self) -> &mut ::std::string::String {
        &mut self.log
    }

    // Take field
    pub fn take_log(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.log, ::std::string::String::new())
    }

    pub fn get_log(&self) -> &str {
        &self.log
    }

    // string info = 4;

    pub fn clear_info(&mut self) {
        self.info.clear();
    }

    // Param is passed by value, moved
    pub fn set_info(&mut self, v: ::std::string::String) {
        self.info = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_info(&mut self) -> &mut ::std::string::String {
        &mut self.info
    }

    // Take field
    pub fn take_info(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.info, ::std::string::String::new())
    }

    pub fn get_info(&self) -> &str {
        &self.info
    }

    // int64 index = 5;

    pub fn clear_index(&mut self) {
        self.index = 0;
    }

    // Param is passed by value, moved
    pub fn set_index(&mut self, v: i64) {
        self.index = v;
    }

    pub fn get_index(&self) -> i64 {
        self.index
    }

    // bytes key = 6;

    pub fn clear_key(&mut self) {
        self.key.clear();
    }

    // Param is passed by value, moved
    pub fn set_key(&mut self, v: ::std::vec::Vec<u8>) {
        self.key = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_key(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.key
    }

    // Take field
    pub fn take_key(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.key, ::std::vec::Vec::new())
    }

    pub fn get_key(&self) -> &[u8] {
        &self.key
    }

    // bytes value = 7;

    pub fn clear_value(&mut self) {
        self.value.clear();
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
        self.value = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_value(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.value
    }

    // Take field
    pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.value, ::std::vec::Vec::new())
    }

    pub fn get_value(&self) -> &[u8] {
        &self.value
    }

    // bytes proof = 8;

    pub fn clear_proof(&mut self) {
        self.proof.clear();
    }

    // Param is passed by value, moved
    pub fn set_proof(&mut self, v: ::std::vec::Vec<u8>) {
        self.proof = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_proof(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.proof
    }

    // Take field
    pub fn take_proof(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.proof, ::std::vec::Vec::new())
    }

    pub fn get_proof(&self) -> &[u8] {
        &self.proof
    }

    // int64 height = 9;

    pub fn clear_height(&mut self) {
        self.height = 0;
    }

    // Param is passed by value, moved
    pub fn set_height(&mut self, v: i64) {
        self.height = v;
    }

    pub fn get_height(&self) -> i64 {
        self.height
    }
}

impl ::protobuf::Message for ResponseQuery {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.code = tmp;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.index = tmp;
                },
                6 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.key)?;
                },
                7 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?;
                },
                8 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.proof)?;
                },
                9 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.height = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.code != 0 {
            my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.log.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.log);
        }
        if !self.info.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.info);
        }
        if self.index != 0 {
            my_size += ::protobuf::rt::value_size(5, self.index, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.key.is_empty() {
            my_size += ::protobuf::rt::bytes_size(6, &self.key);
        }
        if !self.value.is_empty() {
            my_size += ::protobuf::rt::bytes_size(7, &self.value);
        }
        if !self.proof.is_empty() {
            my_size += ::protobuf::rt::bytes_size(8, &self.proof);
        }
        if self.height != 0 {
            my_size += ::protobuf::rt::value_size(9, self.height, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.code != 0 {
            os.write_uint32(1, self.code)?;
        }
        if !self.log.is_empty() {
            os.write_string(3, &self.log)?;
        }
        if !self.info.is_empty() {
            os.write_string(4, &self.info)?;
        }
        if self.index != 0 {
            os.write_int64(5, self.index)?;
        }
        if !self.key.is_empty() {
            os.write_bytes(6, &self.key)?;
        }
        if !self.value.is_empty() {
            os.write_bytes(7, &self.value)?;
        }
        if !self.proof.is_empty() {
            os.write_bytes(8, &self.proof)?;
        }
        if self.height != 0 {
            os.write_int64(9, self.height)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseQuery {
        ResponseQuery::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                    "code",
                    |m: &ResponseQuery| { &m.code },
                    |m: &mut ResponseQuery| { &mut m.code },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "log",
                    |m: &ResponseQuery| { &m.log },
                    |m: &mut ResponseQuery| { &mut m.log },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "info",
                    |m: &ResponseQuery| { &m.info },
                    |m: &mut ResponseQuery| { &mut m.info },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "index",
                    |m: &ResponseQuery| { &m.index },
                    |m: &mut ResponseQuery| { &mut m.index },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "key",
                    |m: &ResponseQuery| { &m.key },
                    |m: &mut ResponseQuery| { &mut m.key },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "value",
                    |m: &ResponseQuery| { &m.value },
                    |m: &mut ResponseQuery| { &mut m.value },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "proof",
                    |m: &ResponseQuery| { &m.proof },
                    |m: &mut ResponseQuery| { &mut m.proof },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "height",
                    |m: &ResponseQuery| { &m.height },
                    |m: &mut ResponseQuery| { &mut m.height },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseQuery>(
                    "ResponseQuery",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseQuery {
        static mut instance: ::protobuf::lazy::Lazy<ResponseQuery> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseQuery,
        };
        unsafe {
            instance.get(ResponseQuery::new)
        }
    }
}

impl ::protobuf::Clear for ResponseQuery {
    fn clear(&mut self) {
        self.clear_code();
        self.clear_log();
        self.clear_info();
        self.clear_index();
        self.clear_key();
        self.clear_value();
        self.clear_proof();
        self.clear_height();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseQuery {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseQuery {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseBeginBlock {
    // message fields
    pub tags: ::protobuf::RepeatedField<super::common::KVPair>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseBeginBlock {
    pub fn new() -> ResponseBeginBlock {
        ::std::default::Default::default()
    }

    // repeated .common.KVPair tags = 1;

    pub fn clear_tags(&mut self) {
        self.tags.clear();
    }

    // Param is passed by value, moved
    pub fn set_tags(&mut self, v: ::protobuf::RepeatedField<super::common::KVPair>) {
        self.tags = v;
    }

    // Mutable pointer to the field.
    pub fn mut_tags(&mut self) -> &mut ::protobuf::RepeatedField<super::common::KVPair> {
        &mut self.tags
    }

    // Take field
    pub fn take_tags(&mut self) -> ::protobuf::RepeatedField<super::common::KVPair> {
        ::std::mem::replace(&mut self.tags, ::protobuf::RepeatedField::new())
    }

    pub fn get_tags(&self) -> &[super::common::KVPair] {
        &self.tags
    }
}

impl ::protobuf::Message for ResponseBeginBlock {
    fn is_initialized(&self) -> bool {
        for v in &self.tags {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.tags)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        for value in &self.tags {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        for v in &self.tags {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseBeginBlock {
        ResponseBeginBlock::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::common::KVPair>>(
                    "tags",
                    |m: &ResponseBeginBlock| { &m.tags },
                    |m: &mut ResponseBeginBlock| { &mut m.tags },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseBeginBlock>(
                    "ResponseBeginBlock",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseBeginBlock {
        static mut instance: ::protobuf::lazy::Lazy<ResponseBeginBlock> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseBeginBlock,
        };
        unsafe {
            instance.get(ResponseBeginBlock::new)
        }
    }
}

impl ::protobuf::Clear for ResponseBeginBlock {
    fn clear(&mut self) {
        self.clear_tags();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseBeginBlock {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseBeginBlock {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseCheckTx {
    // message fields
    pub code: u32,
    pub data: ::std::vec::Vec<u8>,
    pub log: ::std::string::String,
    pub info: ::std::string::String,
    pub gas_wanted: i64,
    pub gas_used: i64,
    pub tags: ::protobuf::RepeatedField<super::common::KVPair>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseCheckTx {
    pub fn new() -> ResponseCheckTx {
        ::std::default::Default::default()
    }

    // uint32 code = 1;

    pub fn clear_code(&mut self) {
        self.code = 0;
    }

    // Param is passed by value, moved
    pub fn set_code(&mut self, v: u32) {
        self.code = v;
    }

    pub fn get_code(&self) -> u32 {
        self.code
    }

    // bytes data = 2;

    pub fn clear_data(&mut self) {
        self.data.clear();
    }

    // Param is passed by value, moved
    pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
        self.data = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.data
    }

    // Take field
    pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
    }

    pub fn get_data(&self) -> &[u8] {
        &self.data
    }

    // string log = 3;

    pub fn clear_log(&mut self) {
        self.log.clear();
    }

    // Param is passed by value, moved
    pub fn set_log(&mut self, v: ::std::string::String) {
        self.log = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_log(&mut self) -> &mut ::std::string::String {
        &mut self.log
    }

    // Take field
    pub fn take_log(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.log, ::std::string::String::new())
    }

    pub fn get_log(&self) -> &str {
        &self.log
    }

    // string info = 4;

    pub fn clear_info(&mut self) {
        self.info.clear();
    }

    // Param is passed by value, moved
    pub fn set_info(&mut self, v: ::std::string::String) {
        self.info = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_info(&mut self) -> &mut ::std::string::String {
        &mut self.info
    }

    // Take field
    pub fn take_info(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.info, ::std::string::String::new())
    }

    pub fn get_info(&self) -> &str {
        &self.info
    }

    // int64 gas_wanted = 5;

    pub fn clear_gas_wanted(&mut self) {
        self.gas_wanted = 0;
    }

    // Param is passed by value, moved
    pub fn set_gas_wanted(&mut self, v: i64) {
        self.gas_wanted = v;
    }

    pub fn get_gas_wanted(&self) -> i64 {
        self.gas_wanted
    }

    // int64 gas_used = 6;

    pub fn clear_gas_used(&mut self) {
        self.gas_used = 0;
    }

    // Param is passed by value, moved
    pub fn set_gas_used(&mut self, v: i64) {
        self.gas_used = v;
    }

    pub fn get_gas_used(&self) -> i64 {
        self.gas_used
    }

    // repeated .common.KVPair tags = 7;

    pub fn clear_tags(&mut self) {
        self.tags.clear();
    }

    // Param is passed by value, moved
    pub fn set_tags(&mut self, v: ::protobuf::RepeatedField<super::common::KVPair>) {
        self.tags = v;
    }

    // Mutable pointer to the field.
    pub fn mut_tags(&mut self) -> &mut ::protobuf::RepeatedField<super::common::KVPair> {
        &mut self.tags
    }

    // Take field
    pub fn take_tags(&mut self) -> ::protobuf::RepeatedField<super::common::KVPair> {
        ::std::mem::replace(&mut self.tags, ::protobuf::RepeatedField::new())
    }

    pub fn get_tags(&self) -> &[super::common::KVPair] {
        &self.tags
    }
}

impl ::protobuf::Message for ResponseCheckTx {
    fn is_initialized(&self) -> bool {
        for v in &self.tags {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.code = tmp;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.gas_wanted = tmp;
                },
                6 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.gas_used = tmp;
                },
                7 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.tags)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.code != 0 {
            my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.data.is_empty() {
            my_size += ::protobuf::rt::bytes_size(2, &self.data);
        }
        if !self.log.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.log);
        }
        if !self.info.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.info);
        }
        if self.gas_wanted != 0 {
            my_size += ::protobuf::rt::value_size(5, self.gas_wanted, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.gas_used != 0 {
            my_size += ::protobuf::rt::value_size(6, self.gas_used, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.tags {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.code != 0 {
            os.write_uint32(1, self.code)?;
        }
        if !self.data.is_empty() {
            os.write_bytes(2, &self.data)?;
        }
        if !self.log.is_empty() {
            os.write_string(3, &self.log)?;
        }
        if !self.info.is_empty() {
            os.write_string(4, &self.info)?;
        }
        if self.gas_wanted != 0 {
            os.write_int64(5, self.gas_wanted)?;
        }
        if self.gas_used != 0 {
            os.write_int64(6, self.gas_used)?;
        }
        for v in &self.tags {
            os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseCheckTx {
        ResponseCheckTx::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                    "code",
                    |m: &ResponseCheckTx| { &m.code },
                    |m: &mut ResponseCheckTx| { &mut m.code },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "data",
                    |m: &ResponseCheckTx| { &m.data },
                    |m: &mut ResponseCheckTx| { &mut m.data },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "log",
                    |m: &ResponseCheckTx| { &m.log },
                    |m: &mut ResponseCheckTx| { &mut m.log },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "info",
                    |m: &ResponseCheckTx| { &m.info },
                    |m: &mut ResponseCheckTx| { &mut m.info },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "gas_wanted",
                    |m: &ResponseCheckTx| { &m.gas_wanted },
                    |m: &mut ResponseCheckTx| { &mut m.gas_wanted },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "gas_used",
                    |m: &ResponseCheckTx| { &m.gas_used },
                    |m: &mut ResponseCheckTx| { &mut m.gas_used },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::common::KVPair>>(
                    "tags",
                    |m: &ResponseCheckTx| { &m.tags },
                    |m: &mut ResponseCheckTx| { &mut m.tags },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseCheckTx>(
                    "ResponseCheckTx",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseCheckTx {
        static mut instance: ::protobuf::lazy::Lazy<ResponseCheckTx> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseCheckTx,
        };
        unsafe {
            instance.get(ResponseCheckTx::new)
        }
    }
}

impl ::protobuf::Clear for ResponseCheckTx {
    fn clear(&mut self) {
        self.clear_code();
        self.clear_data();
        self.clear_log();
        self.clear_info();
        self.clear_gas_wanted();
        self.clear_gas_used();
        self.clear_tags();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseCheckTx {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseCheckTx {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseDeliverTx {
    // message fields
    pub code: u32,
    pub data: ::std::vec::Vec<u8>,
    pub log: ::std::string::String,
    pub info: ::std::string::String,
    pub gas_wanted: i64,
    pub gas_used: i64,
    pub tags: ::protobuf::RepeatedField<super::common::KVPair>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseDeliverTx {
    pub fn new() -> ResponseDeliverTx {
        ::std::default::Default::default()
    }

    // uint32 code = 1;

    pub fn clear_code(&mut self) {
        self.code = 0;
    }

    // Param is passed by value, moved
    pub fn set_code(&mut self, v: u32) {
        self.code = v;
    }

    pub fn get_code(&self) -> u32 {
        self.code
    }

    // bytes data = 2;

    pub fn clear_data(&mut self) {
        self.data.clear();
    }

    // Param is passed by value, moved
    pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
        self.data = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.data
    }

    // Take field
    pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
    }

    pub fn get_data(&self) -> &[u8] {
        &self.data
    }

    // string log = 3;

    pub fn clear_log(&mut self) {
        self.log.clear();
    }

    // Param is passed by value, moved
    pub fn set_log(&mut self, v: ::std::string::String) {
        self.log = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_log(&mut self) -> &mut ::std::string::String {
        &mut self.log
    }

    // Take field
    pub fn take_log(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.log, ::std::string::String::new())
    }

    pub fn get_log(&self) -> &str {
        &self.log
    }

    // string info = 4;

    pub fn clear_info(&mut self) {
        self.info.clear();
    }

    // Param is passed by value, moved
    pub fn set_info(&mut self, v: ::std::string::String) {
        self.info = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_info(&mut self) -> &mut ::std::string::String {
        &mut self.info
    }

    // Take field
    pub fn take_info(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.info, ::std::string::String::new())
    }

    pub fn get_info(&self) -> &str {
        &self.info
    }

    // int64 gas_wanted = 5;

    pub fn clear_gas_wanted(&mut self) {
        self.gas_wanted = 0;
    }

    // Param is passed by value, moved
    pub fn set_gas_wanted(&mut self, v: i64) {
        self.gas_wanted = v;
    }

    pub fn get_gas_wanted(&self) -> i64 {
        self.gas_wanted
    }

    // int64 gas_used = 6;

    pub fn clear_gas_used(&mut self) {
        self.gas_used = 0;
    }

    // Param is passed by value, moved
    pub fn set_gas_used(&mut self, v: i64) {
        self.gas_used = v;
    }

    pub fn get_gas_used(&self) -> i64 {
        self.gas_used
    }

    // repeated .common.KVPair tags = 7;

    pub fn clear_tags(&mut self) {
        self.tags.clear();
    }

    // Param is passed by value, moved
    pub fn set_tags(&mut self, v: ::protobuf::RepeatedField<super::common::KVPair>) {
        self.tags = v;
    }

    // Mutable pointer to the field.
    pub fn mut_tags(&mut self) -> &mut ::protobuf::RepeatedField<super::common::KVPair> {
        &mut self.tags
    }

    // Take field
    pub fn take_tags(&mut self) -> ::protobuf::RepeatedField<super::common::KVPair> {
        ::std::mem::replace(&mut self.tags, ::protobuf::RepeatedField::new())
    }

    pub fn get_tags(&self) -> &[super::common::KVPair] {
        &self.tags
    }
}

impl ::protobuf::Message for ResponseDeliverTx {
    fn is_initialized(&self) -> bool {
        for v in &self.tags {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.code = tmp;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.gas_wanted = tmp;
                },
                6 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.gas_used = tmp;
                },
                7 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.tags)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.code != 0 {
            my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.data.is_empty() {
            my_size += ::protobuf::rt::bytes_size(2, &self.data);
        }
        if !self.log.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.log);
        }
        if !self.info.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.info);
        }
        if self.gas_wanted != 0 {
            my_size += ::protobuf::rt::value_size(5, self.gas_wanted, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.gas_used != 0 {
            my_size += ::protobuf::rt::value_size(6, self.gas_used, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.tags {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.code != 0 {
            os.write_uint32(1, self.code)?;
        }
        if !self.data.is_empty() {
            os.write_bytes(2, &self.data)?;
        }
        if !self.log.is_empty() {
            os.write_string(3, &self.log)?;
        }
        if !self.info.is_empty() {
            os.write_string(4, &self.info)?;
        }
        if self.gas_wanted != 0 {
            os.write_int64(5, self.gas_wanted)?;
        }
        if self.gas_used != 0 {
            os.write_int64(6, self.gas_used)?;
        }
        for v in &self.tags {
            os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseDeliverTx {
        ResponseDeliverTx::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                    "code",
                    |m: &ResponseDeliverTx| { &m.code },
                    |m: &mut ResponseDeliverTx| { &mut m.code },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "data",
                    |m: &ResponseDeliverTx| { &m.data },
                    |m: &mut ResponseDeliverTx| { &mut m.data },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "log",
                    |m: &ResponseDeliverTx| { &m.log },
                    |m: &mut ResponseDeliverTx| { &mut m.log },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "info",
                    |m: &ResponseDeliverTx| { &m.info },
                    |m: &mut ResponseDeliverTx| { &mut m.info },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "gas_wanted",
                    |m: &ResponseDeliverTx| { &m.gas_wanted },
                    |m: &mut ResponseDeliverTx| { &mut m.gas_wanted },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "gas_used",
                    |m: &ResponseDeliverTx| { &m.gas_used },
                    |m: &mut ResponseDeliverTx| { &mut m.gas_used },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::common::KVPair>>(
                    "tags",
                    |m: &ResponseDeliverTx| { &m.tags },
                    |m: &mut ResponseDeliverTx| { &mut m.tags },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseDeliverTx>(
                    "ResponseDeliverTx",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseDeliverTx {
        static mut instance: ::protobuf::lazy::Lazy<ResponseDeliverTx> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseDeliverTx,
        };
        unsafe {
            instance.get(ResponseDeliverTx::new)
        }
    }
}

impl ::protobuf::Clear for ResponseDeliverTx {
    fn clear(&mut self) {
        self.clear_code();
        self.clear_data();
        self.clear_log();
        self.clear_info();
        self.clear_gas_wanted();
        self.clear_gas_used();
        self.clear_tags();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseDeliverTx {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseDeliverTx {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseEndBlock {
    // message fields
    pub validator_updates: ::protobuf::RepeatedField<ValidatorUpdate>,
    pub consensus_param_updates: ::protobuf::SingularPtrField<ConsensusParams>,
    pub tags: ::protobuf::RepeatedField<super::common::KVPair>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseEndBlock {
    pub fn new() -> ResponseEndBlock {
        ::std::default::Default::default()
    }

    // repeated .types.ValidatorUpdate validator_updates = 1;

    pub fn clear_validator_updates(&mut self) {
        self.validator_updates.clear();
    }

    // Param is passed by value, moved
    pub fn set_validator_updates(&mut self, v: ::protobuf::RepeatedField<ValidatorUpdate>) {
        self.validator_updates = v;
    }

    // Mutable pointer to the field.
    pub fn mut_validator_updates(&mut self) -> &mut ::protobuf::RepeatedField<ValidatorUpdate> {
        &mut self.validator_updates
    }

    // Take field
    pub fn take_validator_updates(&mut self) -> ::protobuf::RepeatedField<ValidatorUpdate> {
        ::std::mem::replace(&mut self.validator_updates, ::protobuf::RepeatedField::new())
    }

    pub fn get_validator_updates(&self) -> &[ValidatorUpdate] {
        &self.validator_updates
    }

    // .types.ConsensusParams consensus_param_updates = 2;

    pub fn clear_consensus_param_updates(&mut self) {
        self.consensus_param_updates.clear();
    }

    pub fn has_consensus_param_updates(&self) -> bool {
        self.consensus_param_updates.is_some()
    }

    // Param is passed by value, moved
    pub fn set_consensus_param_updates(&mut self, v: ConsensusParams) {
        self.consensus_param_updates = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_consensus_param_updates(&mut self) -> &mut ConsensusParams {
        if self.consensus_param_updates.is_none() {
            self.consensus_param_updates.set_default();
        }
        self.consensus_param_updates.as_mut().unwrap()
    }

    // Take field
    pub fn take_consensus_param_updates(&mut self) -> ConsensusParams {
        self.consensus_param_updates.take().unwrap_or_else(|| ConsensusParams::new())
    }

    pub fn get_consensus_param_updates(&self) -> &ConsensusParams {
        self.consensus_param_updates.as_ref().unwrap_or_else(|| ConsensusParams::default_instance())
    }

    // repeated .common.KVPair tags = 3;

    pub fn clear_tags(&mut self) {
        self.tags.clear();
    }

    // Param is passed by value, moved
    pub fn set_tags(&mut self, v: ::protobuf::RepeatedField<super::common::KVPair>) {
        self.tags = v;
    }

    // Mutable pointer to the field.
    pub fn mut_tags(&mut self) -> &mut ::protobuf::RepeatedField<super::common::KVPair> {
        &mut self.tags
    }

    // Take field
    pub fn take_tags(&mut self) -> ::protobuf::RepeatedField<super::common::KVPair> {
        ::std::mem::replace(&mut self.tags, ::protobuf::RepeatedField::new())
    }

    pub fn get_tags(&self) -> &[super::common::KVPair] {
        &self.tags
    }
}

impl ::protobuf::Message for ResponseEndBlock {
    fn is_initialized(&self) -> bool {
        for v in &self.validator_updates {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.consensus_param_updates {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.tags {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.validator_updates)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.consensus_param_updates)?;
                },
                3 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.tags)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        for value in &self.validator_updates {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        if let Some(ref v) = self.consensus_param_updates.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        for value in &self.tags {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        for v in &self.validator_updates {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        if let Some(ref v) = self.consensus_param_updates.as_ref() {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        for v in &self.tags {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseEndBlock {
        ResponseEndBlock::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ValidatorUpdate>>(
                    "validator_updates",
                    |m: &ResponseEndBlock| { &m.validator_updates },
                    |m: &mut ResponseEndBlock| { &mut m.validator_updates },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ConsensusParams>>(
                    "consensus_param_updates",
                    |m: &ResponseEndBlock| { &m.consensus_param_updates },
                    |m: &mut ResponseEndBlock| { &mut m.consensus_param_updates },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::common::KVPair>>(
                    "tags",
                    |m: &ResponseEndBlock| { &m.tags },
                    |m: &mut ResponseEndBlock| { &mut m.tags },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseEndBlock>(
                    "ResponseEndBlock",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseEndBlock {
        static mut instance: ::protobuf::lazy::Lazy<ResponseEndBlock> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseEndBlock,
        };
        unsafe {
            instance.get(ResponseEndBlock::new)
        }
    }
}

impl ::protobuf::Clear for ResponseEndBlock {
    fn clear(&mut self) {
        self.clear_validator_updates();
        self.clear_consensus_param_updates();
        self.clear_tags();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseEndBlock {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseEndBlock {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ResponseCommit {
    // message fields
    pub data: ::std::vec::Vec<u8>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ResponseCommit {
    pub fn new() -> ResponseCommit {
        ::std::default::Default::default()
    }

    // bytes data = 2;

    pub fn clear_data(&mut self) {
        self.data.clear();
    }

    // Param is passed by value, moved
    pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
        self.data = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.data
    }

    // Take field
    pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
    }

    pub fn get_data(&self) -> &[u8] {
        &self.data
    }
}

impl ::protobuf::Message for ResponseCommit {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                2 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.data.is_empty() {
            my_size += ::protobuf::rt::bytes_size(2, &self.data);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.data.is_empty() {
            os.write_bytes(2, &self.data)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ResponseCommit {
        ResponseCommit::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "data",
                    |m: &ResponseCommit| { &m.data },
                    |m: &mut ResponseCommit| { &mut m.data },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ResponseCommit>(
                    "ResponseCommit",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ResponseCommit {
        static mut instance: ::protobuf::lazy::Lazy<ResponseCommit> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ResponseCommit,
        };
        unsafe {
            instance.get(ResponseCommit::new)
        }
    }
}

impl ::protobuf::Clear for ResponseCommit {
    fn clear(&mut self) {
        self.clear_data();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ResponseCommit {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ResponseCommit {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ConsensusParams {
    // message fields
    pub block_size: ::protobuf::SingularPtrField<BlockSize>,
    pub evidence_params: ::protobuf::SingularPtrField<EvidenceParams>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ConsensusParams {
    pub fn new() -> ConsensusParams {
        ::std::default::Default::default()
    }

    // .types.BlockSize block_size = 1;

    pub fn clear_block_size(&mut self) {
        self.block_size.clear();
    }

    pub fn has_block_size(&self) -> bool {
        self.block_size.is_some()
    }

    // Param is passed by value, moved
    pub fn set_block_size(&mut self, v: BlockSize) {
        self.block_size = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_block_size(&mut self) -> &mut BlockSize {
        if self.block_size.is_none() {
            self.block_size.set_default();
        }
        self.block_size.as_mut().unwrap()
    }

    // Take field
    pub fn take_block_size(&mut self) -> BlockSize {
        self.block_size.take().unwrap_or_else(|| BlockSize::new())
    }

    pub fn get_block_size(&self) -> &BlockSize {
        self.block_size.as_ref().unwrap_or_else(|| BlockSize::default_instance())
    }

    // .types.EvidenceParams evidence_params = 2;

    pub fn clear_evidence_params(&mut self) {
        self.evidence_params.clear();
    }

    pub fn has_evidence_params(&self) -> bool {
        self.evidence_params.is_some()
    }

    // Param is passed by value, moved
    pub fn set_evidence_params(&mut self, v: EvidenceParams) {
        self.evidence_params = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_evidence_params(&mut self) -> &mut EvidenceParams {
        if self.evidence_params.is_none() {
            self.evidence_params.set_default();
        }
        self.evidence_params.as_mut().unwrap()
    }

    // Take field
    pub fn take_evidence_params(&mut self) -> EvidenceParams {
        self.evidence_params.take().unwrap_or_else(|| EvidenceParams::new())
    }

    pub fn get_evidence_params(&self) -> &EvidenceParams {
        self.evidence_params.as_ref().unwrap_or_else(|| EvidenceParams::default_instance())
    }
}

impl ::protobuf::Message for ConsensusParams {
    fn is_initialized(&self) -> bool {
        for v in &self.block_size {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.evidence_params {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.block_size)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.evidence_params)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(ref v) = self.block_size.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.evidence_params.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if let Some(ref v) = self.block_size.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.evidence_params.as_ref() {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ConsensusParams {
        ConsensusParams::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockSize>>(
                    "block_size",
                    |m: &ConsensusParams| { &m.block_size },
                    |m: &mut ConsensusParams| { &mut m.block_size },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<EvidenceParams>>(
                    "evidence_params",
                    |m: &ConsensusParams| { &m.evidence_params },
                    |m: &mut ConsensusParams| { &mut m.evidence_params },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ConsensusParams>(
                    "ConsensusParams",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ConsensusParams {
        static mut instance: ::protobuf::lazy::Lazy<ConsensusParams> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ConsensusParams,
        };
        unsafe {
            instance.get(ConsensusParams::new)
        }
    }
}

impl ::protobuf::Clear for ConsensusParams {
    fn clear(&mut self) {
        self.clear_block_size();
        self.clear_evidence_params();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ConsensusParams {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ConsensusParams {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct BlockSize {
    // message fields
    pub max_bytes: i64,
    pub max_gas: i64,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl BlockSize {
    pub fn new() -> BlockSize {
        ::std::default::Default::default()
    }

    // int64 max_bytes = 1;

    pub fn clear_max_bytes(&mut self) {
        self.max_bytes = 0;
    }

    // Param is passed by value, moved
    pub fn set_max_bytes(&mut self, v: i64) {
        self.max_bytes = v;
    }

    pub fn get_max_bytes(&self) -> i64 {
        self.max_bytes
    }

    // int64 max_gas = 2;

    pub fn clear_max_gas(&mut self) {
        self.max_gas = 0;
    }

    // Param is passed by value, moved
    pub fn set_max_gas(&mut self, v: i64) {
        self.max_gas = v;
    }

    pub fn get_max_gas(&self) -> i64 {
        self.max_gas
    }
}

impl ::protobuf::Message for BlockSize {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.max_bytes = tmp;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.max_gas = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.max_bytes != 0 {
            my_size += ::protobuf::rt::value_size(1, self.max_bytes, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.max_gas != 0 {
            my_size += ::protobuf::rt::value_size(2, self.max_gas, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.max_bytes != 0 {
            os.write_int64(1, self.max_bytes)?;
        }
        if self.max_gas != 0 {
            os.write_int64(2, self.max_gas)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> BlockSize {
        BlockSize::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "max_bytes",
                    |m: &BlockSize| { &m.max_bytes },
                    |m: &mut BlockSize| { &mut m.max_bytes },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "max_gas",
                    |m: &BlockSize| { &m.max_gas },
                    |m: &mut BlockSize| { &mut m.max_gas },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<BlockSize>(
                    "BlockSize",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static BlockSize {
        static mut instance: ::protobuf::lazy::Lazy<BlockSize> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const BlockSize,
        };
        unsafe {
            instance.get(BlockSize::new)
        }
    }
}

impl ::protobuf::Clear for BlockSize {
    fn clear(&mut self) {
        self.clear_max_bytes();
        self.clear_max_gas();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for BlockSize {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for BlockSize {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct EvidenceParams {
    // message fields
    pub max_age: i64,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl EvidenceParams {
    pub fn new() -> EvidenceParams {
        ::std::default::Default::default()
    }

    // int64 max_age = 1;

    pub fn clear_max_age(&mut self) {
        self.max_age = 0;
    }

    // Param is passed by value, moved
    pub fn set_max_age(&mut self, v: i64) {
        self.max_age = v;
    }

    pub fn get_max_age(&self) -> i64 {
        self.max_age
    }
}

impl ::protobuf::Message for EvidenceParams {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.max_age = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.max_age != 0 {
            my_size += ::protobuf::rt::value_size(1, self.max_age, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.max_age != 0 {
            os.write_int64(1, self.max_age)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> EvidenceParams {
        EvidenceParams::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "max_age",
                    |m: &EvidenceParams| { &m.max_age },
                    |m: &mut EvidenceParams| { &mut m.max_age },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<EvidenceParams>(
                    "EvidenceParams",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static EvidenceParams {
        static mut instance: ::protobuf::lazy::Lazy<EvidenceParams> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const EvidenceParams,
        };
        unsafe {
            instance.get(EvidenceParams::new)
        }
    }
}

impl ::protobuf::Clear for EvidenceParams {
    fn clear(&mut self) {
        self.clear_max_age();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for EvidenceParams {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for EvidenceParams {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct LastCommitInfo {
    // message fields
    pub round: i32,
    pub votes: ::protobuf::RepeatedField<VoteInfo>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl LastCommitInfo {
    pub fn new() -> LastCommitInfo {
        ::std::default::Default::default()
    }

    // int32 round = 1;

    pub fn clear_round(&mut self) {
        self.round = 0;
    }

    // Param is passed by value, moved
    pub fn set_round(&mut self, v: i32) {
        self.round = v;
    }

    pub fn get_round(&self) -> i32 {
        self.round
    }

    // repeated .types.VoteInfo votes = 2;

    pub fn clear_votes(&mut self) {
        self.votes.clear();
    }

    // Param is passed by value, moved
    pub fn set_votes(&mut self, v: ::protobuf::RepeatedField<VoteInfo>) {
        self.votes = v;
    }

    // Mutable pointer to the field.
    pub fn mut_votes(&mut self) -> &mut ::protobuf::RepeatedField<VoteInfo> {
        &mut self.votes
    }

    // Take field
    pub fn take_votes(&mut self) -> ::protobuf::RepeatedField<VoteInfo> {
        ::std::mem::replace(&mut self.votes, ::protobuf::RepeatedField::new())
    }

    pub fn get_votes(&self) -> &[VoteInfo] {
        &self.votes
    }
}

impl ::protobuf::Message for LastCommitInfo {
    fn is_initialized(&self) -> bool {
        for v in &self.votes {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int32()?;
                    self.round = tmp;
                },
                2 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.votes)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.round != 0 {
            my_size += ::protobuf::rt::value_size(1, self.round, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.votes {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.round != 0 {
            os.write_int32(1, self.round)?;
        }
        for v in &self.votes {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> LastCommitInfo {
        LastCommitInfo::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                    "round",
                    |m: &LastCommitInfo| { &m.round },
                    |m: &mut LastCommitInfo| { &mut m.round },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<VoteInfo>>(
                    "votes",
                    |m: &LastCommitInfo| { &m.votes },
                    |m: &mut LastCommitInfo| { &mut m.votes },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<LastCommitInfo>(
                    "LastCommitInfo",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static LastCommitInfo {
        static mut instance: ::protobuf::lazy::Lazy<LastCommitInfo> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const LastCommitInfo,
        };
        unsafe {
            instance.get(LastCommitInfo::new)
        }
    }
}

impl ::protobuf::Clear for LastCommitInfo {
    fn clear(&mut self) {
        self.clear_round();
        self.clear_votes();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for LastCommitInfo {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for LastCommitInfo {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct Header {
    // message fields
    pub chain_id: ::std::string::String,
    pub height: i64,
    pub time: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
    pub num_txs: i64,
    pub total_txs: i64,
    pub last_block_id: ::protobuf::SingularPtrField<BlockID>,
    pub last_commit_hash: ::std::vec::Vec<u8>,
    pub data_hash: ::std::vec::Vec<u8>,
    pub validators_hash: ::std::vec::Vec<u8>,
    pub next_validators_hash: ::std::vec::Vec<u8>,
    pub consensus_hash: ::std::vec::Vec<u8>,
    pub app_hash: ::std::vec::Vec<u8>,
    pub last_results_hash: ::std::vec::Vec<u8>,
    pub evidence_hash: ::std::vec::Vec<u8>,
    pub proposer_address: ::std::vec::Vec<u8>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl Header {
    pub fn new() -> Header {
        ::std::default::Default::default()
    }

    // string chain_id = 1;

    pub fn clear_chain_id(&mut self) {
        self.chain_id.clear();
    }

    // Param is passed by value, moved
    pub fn set_chain_id(&mut self, v: ::std::string::String) {
        self.chain_id = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_chain_id(&mut self) -> &mut ::std::string::String {
        &mut self.chain_id
    }

    // Take field
    pub fn take_chain_id(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.chain_id, ::std::string::String::new())
    }

    pub fn get_chain_id(&self) -> &str {
        &self.chain_id
    }

    // int64 height = 2;

    pub fn clear_height(&mut self) {
        self.height = 0;
    }

    // Param is passed by value, moved
    pub fn set_height(&mut self, v: i64) {
        self.height = v;
    }

    pub fn get_height(&self) -> i64 {
        self.height
    }

    // .google.protobuf.Timestamp time = 3;

    pub fn clear_time(&mut self) {
        self.time.clear();
    }

    pub fn has_time(&self) -> bool {
        self.time.is_some()
    }

    // Param is passed by value, moved
    pub fn set_time(&mut self, v: ::protobuf::well_known_types::Timestamp) {
        self.time = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_time(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
        if self.time.is_none() {
            self.time.set_default();
        }
        self.time.as_mut().unwrap()
    }

    // Take field
    pub fn take_time(&mut self) -> ::protobuf::well_known_types::Timestamp {
        self.time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
    }

    pub fn get_time(&self) -> &::protobuf::well_known_types::Timestamp {
        self.time.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance())
    }

    // int64 num_txs = 4;

    pub fn clear_num_txs(&mut self) {
        self.num_txs = 0;
    }

    // Param is passed by value, moved
    pub fn set_num_txs(&mut self, v: i64) {
        self.num_txs = v;
    }

    pub fn get_num_txs(&self) -> i64 {
        self.num_txs
    }

    // int64 total_txs = 5;

    pub fn clear_total_txs(&mut self) {
        self.total_txs = 0;
    }

    // Param is passed by value, moved
    pub fn set_total_txs(&mut self, v: i64) {
        self.total_txs = v;
    }

    pub fn get_total_txs(&self) -> i64 {
        self.total_txs
    }

    // .types.BlockID last_block_id = 6;

    pub fn clear_last_block_id(&mut self) {
        self.last_block_id.clear();
    }

    pub fn has_last_block_id(&self) -> bool {
        self.last_block_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_last_block_id(&mut self, v: BlockID) {
        self.last_block_id = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_last_block_id(&mut self) -> &mut BlockID {
        if self.last_block_id.is_none() {
            self.last_block_id.set_default();
        }
        self.last_block_id.as_mut().unwrap()
    }

    // Take field
    pub fn take_last_block_id(&mut self) -> BlockID {
        self.last_block_id.take().unwrap_or_else(|| BlockID::new())
    }

    pub fn get_last_block_id(&self) -> &BlockID {
        self.last_block_id.as_ref().unwrap_or_else(|| BlockID::default_instance())
    }

    // bytes last_commit_hash = 7;

    pub fn clear_last_commit_hash(&mut self) {
        self.last_commit_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_last_commit_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.last_commit_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_last_commit_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.last_commit_hash
    }

    // Take field
    pub fn take_last_commit_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.last_commit_hash, ::std::vec::Vec::new())
    }

    pub fn get_last_commit_hash(&self) -> &[u8] {
        &self.last_commit_hash
    }

    // bytes data_hash = 8;

    pub fn clear_data_hash(&mut self) {
        self.data_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_data_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.data_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_data_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.data_hash
    }

    // Take field
    pub fn take_data_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.data_hash, ::std::vec::Vec::new())
    }

    pub fn get_data_hash(&self) -> &[u8] {
        &self.data_hash
    }

    // bytes validators_hash = 9;

    pub fn clear_validators_hash(&mut self) {
        self.validators_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_validators_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.validators_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_validators_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.validators_hash
    }

    // Take field
    pub fn take_validators_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.validators_hash, ::std::vec::Vec::new())
    }

    pub fn get_validators_hash(&self) -> &[u8] {
        &self.validators_hash
    }

    // bytes next_validators_hash = 10;

    pub fn clear_next_validators_hash(&mut self) {
        self.next_validators_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_next_validators_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.next_validators_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_next_validators_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.next_validators_hash
    }

    // Take field
    pub fn take_next_validators_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.next_validators_hash, ::std::vec::Vec::new())
    }

    pub fn get_next_validators_hash(&self) -> &[u8] {
        &self.next_validators_hash
    }

    // bytes consensus_hash = 11;

    pub fn clear_consensus_hash(&mut self) {
        self.consensus_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_consensus_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.consensus_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_consensus_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.consensus_hash
    }

    // Take field
    pub fn take_consensus_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.consensus_hash, ::std::vec::Vec::new())
    }

    pub fn get_consensus_hash(&self) -> &[u8] {
        &self.consensus_hash
    }

    // bytes app_hash = 12;

    pub fn clear_app_hash(&mut self) {
        self.app_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_app_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.app_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_app_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.app_hash
    }

    // Take field
    pub fn take_app_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.app_hash, ::std::vec::Vec::new())
    }

    pub fn get_app_hash(&self) -> &[u8] {
        &self.app_hash
    }

    // bytes last_results_hash = 13;

    pub fn clear_last_results_hash(&mut self) {
        self.last_results_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_last_results_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.last_results_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_last_results_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.last_results_hash
    }

    // Take field
    pub fn take_last_results_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.last_results_hash, ::std::vec::Vec::new())
    }

    pub fn get_last_results_hash(&self) -> &[u8] {
        &self.last_results_hash
    }

    // bytes evidence_hash = 14;

    pub fn clear_evidence_hash(&mut self) {
        self.evidence_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_evidence_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.evidence_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_evidence_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.evidence_hash
    }

    // Take field
    pub fn take_evidence_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.evidence_hash, ::std::vec::Vec::new())
    }

    pub fn get_evidence_hash(&self) -> &[u8] {
        &self.evidence_hash
    }

    // bytes proposer_address = 15;

    pub fn clear_proposer_address(&mut self) {
        self.proposer_address.clear();
    }

    // Param is passed by value, moved
    pub fn set_proposer_address(&mut self, v: ::std::vec::Vec<u8>) {
        self.proposer_address = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_proposer_address(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.proposer_address
    }

    // Take field
    pub fn take_proposer_address(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.proposer_address, ::std::vec::Vec::new())
    }

    pub fn get_proposer_address(&self) -> &[u8] {
        &self.proposer_address
    }
}

impl ::protobuf::Message for Header {
    fn is_initialized(&self) -> bool {
        for v in &self.time {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.last_block_id {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.chain_id)?;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.height = tmp;
                },
                3 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.time)?;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.num_txs = tmp;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.total_txs = tmp;
                },
                6 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.last_block_id)?;
                },
                7 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.last_commit_hash)?;
                },
                8 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data_hash)?;
                },
                9 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.validators_hash)?;
                },
                10 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.next_validators_hash)?;
                },
                11 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.consensus_hash)?;
                },
                12 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.app_hash)?;
                },
                13 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.last_results_hash)?;
                },
                14 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.evidence_hash)?;
                },
                15 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.proposer_address)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.chain_id.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.chain_id);
        }
        if self.height != 0 {
            my_size += ::protobuf::rt::value_size(2, self.height, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.time.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if self.num_txs != 0 {
            my_size += ::protobuf::rt::value_size(4, self.num_txs, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.total_txs != 0 {
            my_size += ::protobuf::rt::value_size(5, self.total_txs, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.last_block_id.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if !self.last_commit_hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(7, &self.last_commit_hash);
        }
        if !self.data_hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(8, &self.data_hash);
        }
        if !self.validators_hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(9, &self.validators_hash);
        }
        if !self.next_validators_hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(10, &self.next_validators_hash);
        }
        if !self.consensus_hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(11, &self.consensus_hash);
        }
        if !self.app_hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(12, &self.app_hash);
        }
        if !self.last_results_hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(13, &self.last_results_hash);
        }
        if !self.evidence_hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(14, &self.evidence_hash);
        }
        if !self.proposer_address.is_empty() {
            my_size += ::protobuf::rt::bytes_size(15, &self.proposer_address);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.chain_id.is_empty() {
            os.write_string(1, &self.chain_id)?;
        }
        if self.height != 0 {
            os.write_int64(2, self.height)?;
        }
        if let Some(ref v) = self.time.as_ref() {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if self.num_txs != 0 {
            os.write_int64(4, self.num_txs)?;
        }
        if self.total_txs != 0 {
            os.write_int64(5, self.total_txs)?;
        }
        if let Some(ref v) = self.last_block_id.as_ref() {
            os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if !self.last_commit_hash.is_empty() {
            os.write_bytes(7, &self.last_commit_hash)?;
        }
        if !self.data_hash.is_empty() {
            os.write_bytes(8, &self.data_hash)?;
        }
        if !self.validators_hash.is_empty() {
            os.write_bytes(9, &self.validators_hash)?;
        }
        if !self.next_validators_hash.is_empty() {
            os.write_bytes(10, &self.next_validators_hash)?;
        }
        if !self.consensus_hash.is_empty() {
            os.write_bytes(11, &self.consensus_hash)?;
        }
        if !self.app_hash.is_empty() {
            os.write_bytes(12, &self.app_hash)?;
        }
        if !self.last_results_hash.is_empty() {
            os.write_bytes(13, &self.last_results_hash)?;
        }
        if !self.evidence_hash.is_empty() {
            os.write_bytes(14, &self.evidence_hash)?;
        }
        if !self.proposer_address.is_empty() {
            os.write_bytes(15, &self.proposer_address)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> Header {
        Header::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "chain_id",
                    |m: &Header| { &m.chain_id },
                    |m: &mut Header| { &mut m.chain_id },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "height",
                    |m: &Header| { &m.height },
                    |m: &mut Header| { &mut m.height },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
                    "time",
                    |m: &Header| { &m.time },
                    |m: &mut Header| { &mut m.time },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "num_txs",
                    |m: &Header| { &m.num_txs },
                    |m: &mut Header| { &mut m.num_txs },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "total_txs",
                    |m: &Header| { &m.total_txs },
                    |m: &mut Header| { &mut m.total_txs },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockID>>(
                    "last_block_id",
                    |m: &Header| { &m.last_block_id },
                    |m: &mut Header| { &mut m.last_block_id },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "last_commit_hash",
                    |m: &Header| { &m.last_commit_hash },
                    |m: &mut Header| { &mut m.last_commit_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "data_hash",
                    |m: &Header| { &m.data_hash },
                    |m: &mut Header| { &mut m.data_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "validators_hash",
                    |m: &Header| { &m.validators_hash },
                    |m: &mut Header| { &mut m.validators_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "next_validators_hash",
                    |m: &Header| { &m.next_validators_hash },
                    |m: &mut Header| { &mut m.next_validators_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "consensus_hash",
                    |m: &Header| { &m.consensus_hash },
                    |m: &mut Header| { &mut m.consensus_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "app_hash",
                    |m: &Header| { &m.app_hash },
                    |m: &mut Header| { &mut m.app_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "last_results_hash",
                    |m: &Header| { &m.last_results_hash },
                    |m: &mut Header| { &mut m.last_results_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "evidence_hash",
                    |m: &Header| { &m.evidence_hash },
                    |m: &mut Header| { &mut m.evidence_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "proposer_address",
                    |m: &Header| { &m.proposer_address },
                    |m: &mut Header| { &mut m.proposer_address },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<Header>(
                    "Header",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static Header {
        static mut instance: ::protobuf::lazy::Lazy<Header> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const Header,
        };
        unsafe {
            instance.get(Header::new)
        }
    }
}

impl ::protobuf::Clear for Header {
    fn clear(&mut self) {
        self.clear_chain_id();
        self.clear_height();
        self.clear_time();
        self.clear_num_txs();
        self.clear_total_txs();
        self.clear_last_block_id();
        self.clear_last_commit_hash();
        self.clear_data_hash();
        self.clear_validators_hash();
        self.clear_next_validators_hash();
        self.clear_consensus_hash();
        self.clear_app_hash();
        self.clear_last_results_hash();
        self.clear_evidence_hash();
        self.clear_proposer_address();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for Header {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Header {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct BlockID {
    // message fields
    pub hash: ::std::vec::Vec<u8>,
    pub parts_header: ::protobuf::SingularPtrField<PartSetHeader>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl BlockID {
    pub fn new() -> BlockID {
        ::std::default::Default::default()
    }

    // bytes hash = 1;

    pub fn clear_hash(&mut self) {
        self.hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.hash
    }

    // Take field
    pub fn take_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.hash, ::std::vec::Vec::new())
    }

    pub fn get_hash(&self) -> &[u8] {
        &self.hash
    }

    // .types.PartSetHeader parts_header = 2;

    pub fn clear_parts_header(&mut self) {
        self.parts_header.clear();
    }

    pub fn has_parts_header(&self) -> bool {
        self.parts_header.is_some()
    }

    // Param is passed by value, moved
    pub fn set_parts_header(&mut self, v: PartSetHeader) {
        self.parts_header = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_parts_header(&mut self) -> &mut PartSetHeader {
        if self.parts_header.is_none() {
            self.parts_header.set_default();
        }
        self.parts_header.as_mut().unwrap()
    }

    // Take field
    pub fn take_parts_header(&mut self) -> PartSetHeader {
        self.parts_header.take().unwrap_or_else(|| PartSetHeader::new())
    }

    pub fn get_parts_header(&self) -> &PartSetHeader {
        self.parts_header.as_ref().unwrap_or_else(|| PartSetHeader::default_instance())
    }
}

impl ::protobuf::Message for BlockID {
    fn is_initialized(&self) -> bool {
        for v in &self.parts_header {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.hash)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.parts_header)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(1, &self.hash);
        }
        if let Some(ref v) = self.parts_header.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.hash.is_empty() {
            os.write_bytes(1, &self.hash)?;
        }
        if let Some(ref v) = self.parts_header.as_ref() {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> BlockID {
        BlockID::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "hash",
                    |m: &BlockID| { &m.hash },
                    |m: &mut BlockID| { &mut m.hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PartSetHeader>>(
                    "parts_header",
                    |m: &BlockID| { &m.parts_header },
                    |m: &mut BlockID| { &mut m.parts_header },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<BlockID>(
                    "BlockID",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static BlockID {
        static mut instance: ::protobuf::lazy::Lazy<BlockID> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const BlockID,
        };
        unsafe {
            instance.get(BlockID::new)
        }
    }
}

impl ::protobuf::Clear for BlockID {
    fn clear(&mut self) {
        self.clear_hash();
        self.clear_parts_header();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for BlockID {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for BlockID {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct PartSetHeader {
    // message fields
    pub total: i32,
    pub hash: ::std::vec::Vec<u8>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl PartSetHeader {
    pub fn new() -> PartSetHeader {
        ::std::default::Default::default()
    }

    // int32 total = 1;

    pub fn clear_total(&mut self) {
        self.total = 0;
    }

    // Param is passed by value, moved
    pub fn set_total(&mut self, v: i32) {
        self.total = v;
    }

    pub fn get_total(&self) -> i32 {
        self.total
    }

    // bytes hash = 2;

    pub fn clear_hash(&mut self) {
        self.hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.hash
    }

    // Take field
    pub fn take_hash(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.hash, ::std::vec::Vec::new())
    }

    pub fn get_hash(&self) -> &[u8] {
        &self.hash
    }
}

impl ::protobuf::Message for PartSetHeader {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int32()?;
                    self.total = tmp;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.hash)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.total != 0 {
            my_size += ::protobuf::rt::value_size(1, self.total, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.hash.is_empty() {
            my_size += ::protobuf::rt::bytes_size(2, &self.hash);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.total != 0 {
            os.write_int32(1, self.total)?;
        }
        if !self.hash.is_empty() {
            os.write_bytes(2, &self.hash)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> PartSetHeader {
        PartSetHeader::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                    "total",
                    |m: &PartSetHeader| { &m.total },
                    |m: &mut PartSetHeader| { &mut m.total },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "hash",
                    |m: &PartSetHeader| { &m.hash },
                    |m: &mut PartSetHeader| { &mut m.hash },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<PartSetHeader>(
                    "PartSetHeader",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static PartSetHeader {
        static mut instance: ::protobuf::lazy::Lazy<PartSetHeader> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const PartSetHeader,
        };
        unsafe {
            instance.get(PartSetHeader::new)
        }
    }
}

impl ::protobuf::Clear for PartSetHeader {
    fn clear(&mut self) {
        self.clear_total();
        self.clear_hash();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for PartSetHeader {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for PartSetHeader {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct Validator {
    // message fields
    pub address: ::std::vec::Vec<u8>,
    pub power: i64,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl Validator {
    pub fn new() -> Validator {
        ::std::default::Default::default()
    }

    // bytes address = 1;

    pub fn clear_address(&mut self) {
        self.address.clear();
    }

    // Param is passed by value, moved
    pub fn set_address(&mut self, v: ::std::vec::Vec<u8>) {
        self.address = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_address(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.address
    }

    // Take field
    pub fn take_address(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.address, ::std::vec::Vec::new())
    }

    pub fn get_address(&self) -> &[u8] {
        &self.address
    }

    // int64 power = 3;

    pub fn clear_power(&mut self) {
        self.power = 0;
    }

    // Param is passed by value, moved
    pub fn set_power(&mut self, v: i64) {
        self.power = v;
    }

    pub fn get_power(&self) -> i64 {
        self.power
    }
}

impl ::protobuf::Message for Validator {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.address)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.power = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.address.is_empty() {
            my_size += ::protobuf::rt::bytes_size(1, &self.address);
        }
        if self.power != 0 {
            my_size += ::protobuf::rt::value_size(3, self.power, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.address.is_empty() {
            os.write_bytes(1, &self.address)?;
        }
        if self.power != 0 {
            os.write_int64(3, self.power)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> Validator {
        Validator::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "address",
                    |m: &Validator| { &m.address },
                    |m: &mut Validator| { &mut m.address },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "power",
                    |m: &Validator| { &m.power },
                    |m: &mut Validator| { &mut m.power },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<Validator>(
                    "Validator",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static Validator {
        static mut instance: ::protobuf::lazy::Lazy<Validator> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const Validator,
        };
        unsafe {
            instance.get(Validator::new)
        }
    }
}

impl ::protobuf::Clear for Validator {
    fn clear(&mut self) {
        self.clear_address();
        self.clear_power();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for Validator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Validator {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ValidatorUpdate {
    // message fields
    pub pub_key: ::protobuf::SingularPtrField<PubKey>,
    pub power: i64,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl ValidatorUpdate {
    pub fn new() -> ValidatorUpdate {
        ::std::default::Default::default()
    }

    // .types.PubKey pub_key = 1;

    pub fn clear_pub_key(&mut self) {
        self.pub_key.clear();
    }

    pub fn has_pub_key(&self) -> bool {
        self.pub_key.is_some()
    }

    // Param is passed by value, moved
    pub fn set_pub_key(&mut self, v: PubKey) {
        self.pub_key = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_pub_key(&mut self) -> &mut PubKey {
        if self.pub_key.is_none() {
            self.pub_key.set_default();
        }
        self.pub_key.as_mut().unwrap()
    }

    // Take field
    pub fn take_pub_key(&mut self) -> PubKey {
        self.pub_key.take().unwrap_or_else(|| PubKey::new())
    }

    pub fn get_pub_key(&self) -> &PubKey {
        self.pub_key.as_ref().unwrap_or_else(|| PubKey::default_instance())
    }

    // int64 power = 2;

    pub fn clear_power(&mut self) {
        self.power = 0;
    }

    // Param is passed by value, moved
    pub fn set_power(&mut self, v: i64) {
        self.power = v;
    }

    pub fn get_power(&self) -> i64 {
        self.power
    }
}

impl ::protobuf::Message for ValidatorUpdate {
    fn is_initialized(&self) -> bool {
        for v in &self.pub_key {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.pub_key)?;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.power = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(ref v) = self.pub_key.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if self.power != 0 {
            my_size += ::protobuf::rt::value_size(2, self.power, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if let Some(ref v) = self.pub_key.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if self.power != 0 {
            os.write_int64(2, self.power)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ValidatorUpdate {
        ValidatorUpdate::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PubKey>>(
                    "pub_key",
                    |m: &ValidatorUpdate| { &m.pub_key },
                    |m: &mut ValidatorUpdate| { &mut m.pub_key },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "power",
                    |m: &ValidatorUpdate| { &m.power },
                    |m: &mut ValidatorUpdate| { &mut m.power },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<ValidatorUpdate>(
                    "ValidatorUpdate",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static ValidatorUpdate {
        static mut instance: ::protobuf::lazy::Lazy<ValidatorUpdate> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ValidatorUpdate,
        };
        unsafe {
            instance.get(ValidatorUpdate::new)
        }
    }
}

impl ::protobuf::Clear for ValidatorUpdate {
    fn clear(&mut self) {
        self.clear_pub_key();
        self.clear_power();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ValidatorUpdate {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ValidatorUpdate {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct VoteInfo {
    // message fields
    pub validator: ::protobuf::SingularPtrField<Validator>,
    pub signed_last_block: bool,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl VoteInfo {
    pub fn new() -> VoteInfo {
        ::std::default::Default::default()
    }

    // .types.Validator validator = 1;

    pub fn clear_validator(&mut self) {
        self.validator.clear();
    }

    pub fn has_validator(&self) -> bool {
        self.validator.is_some()
    }

    // Param is passed by value, moved
    pub fn set_validator(&mut self, v: Validator) {
        self.validator = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_validator(&mut self) -> &mut Validator {
        if self.validator.is_none() {
            self.validator.set_default();
        }
        self.validator.as_mut().unwrap()
    }

    // Take field
    pub fn take_validator(&mut self) -> Validator {
        self.validator.take().unwrap_or_else(|| Validator::new())
    }

    pub fn get_validator(&self) -> &Validator {
        self.validator.as_ref().unwrap_or_else(|| Validator::default_instance())
    }

    // bool signed_last_block = 2;

    pub fn clear_signed_last_block(&mut self) {
        self.signed_last_block = false;
    }

    // Param is passed by value, moved
    pub fn set_signed_last_block(&mut self, v: bool) {
        self.signed_last_block = v;
    }

    pub fn get_signed_last_block(&self) -> bool {
        self.signed_last_block
    }
}

impl ::protobuf::Message for VoteInfo {
    fn is_initialized(&self) -> bool {
        for v in &self.validator {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.validator)?;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.signed_last_block = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(ref v) = self.validator.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if self.signed_last_block != false {
            my_size += 2;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if let Some(ref v) = self.validator.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if self.signed_last_block != false {
            os.write_bool(2, self.signed_last_block)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> VoteInfo {
        VoteInfo::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Validator>>(
                    "validator",
                    |m: &VoteInfo| { &m.validator },
                    |m: &mut VoteInfo| { &mut m.validator },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                    "signed_last_block",
                    |m: &VoteInfo| { &m.signed_last_block },
                    |m: &mut VoteInfo| { &mut m.signed_last_block },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<VoteInfo>(
                    "VoteInfo",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static VoteInfo {
        static mut instance: ::protobuf::lazy::Lazy<VoteInfo> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const VoteInfo,
        };
        unsafe {
            instance.get(VoteInfo::new)
        }
    }
}

impl ::protobuf::Clear for VoteInfo {
    fn clear(&mut self) {
        self.clear_validator();
        self.clear_signed_last_block();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for VoteInfo {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for VoteInfo {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct PubKey {
    // message fields
    pub field_type: ::std::string::String,
    pub data: ::std::vec::Vec<u8>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl PubKey {
    pub fn new() -> PubKey {
        ::std::default::Default::default()
    }

    // string type = 1;

    pub fn clear_field_type(&mut self) {
        self.field_type.clear();
    }

    // Param is passed by value, moved
    pub fn set_field_type(&mut self, v: ::std::string::String) {
        self.field_type = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
        &mut self.field_type
    }

    // Take field
    pub fn take_field_type(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.field_type, ::std::string::String::new())
    }

    pub fn get_field_type(&self) -> &str {
        &self.field_type
    }

    // bytes data = 2;

    pub fn clear_data(&mut self) {
        self.data.clear();
    }

    // Param is passed by value, moved
    pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
        self.data = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.data
    }

    // Take field
    pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
    }

    pub fn get_data(&self) -> &[u8] {
        &self.data
    }
}

impl ::protobuf::Message for PubKey {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.field_type.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.field_type);
        }
        if !self.data.is_empty() {
            my_size += ::protobuf::rt::bytes_size(2, &self.data);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.field_type.is_empty() {
            os.write_string(1, &self.field_type)?;
        }
        if !self.data.is_empty() {
            os.write_bytes(2, &self.data)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> PubKey {
        PubKey::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "type",
                    |m: &PubKey| { &m.field_type },
                    |m: &mut PubKey| { &mut m.field_type },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "data",
                    |m: &PubKey| { &m.data },
                    |m: &mut PubKey| { &mut m.data },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<PubKey>(
                    "PubKey",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static PubKey {
        static mut instance: ::protobuf::lazy::Lazy<PubKey> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const PubKey,
        };
        unsafe {
            instance.get(PubKey::new)
        }
    }
}

impl ::protobuf::Clear for PubKey {
    fn clear(&mut self) {
        self.clear_field_type();
        self.clear_data();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for PubKey {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for PubKey {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct Evidence {
    // message fields
    pub field_type: ::std::string::String,
    pub validator: ::protobuf::SingularPtrField<Validator>,
    pub height: i64,
    pub time: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
    pub total_voting_power: i64,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl Evidence {
    pub fn new() -> Evidence {
        ::std::default::Default::default()
    }

    // string type = 1;

    pub fn clear_field_type(&mut self) {
        self.field_type.clear();
    }

    // Param is passed by value, moved
    pub fn set_field_type(&mut self, v: ::std::string::String) {
        self.field_type = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
        &mut self.field_type
    }

    // Take field
    pub fn take_field_type(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.field_type, ::std::string::String::new())
    }

    pub fn get_field_type(&self) -> &str {
        &self.field_type
    }

    // .types.Validator validator = 2;

    pub fn clear_validator(&mut self) {
        self.validator.clear();
    }

    pub fn has_validator(&self) -> bool {
        self.validator.is_some()
    }

    // Param is passed by value, moved
    pub fn set_validator(&mut self, v: Validator) {
        self.validator = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_validator(&mut self) -> &mut Validator {
        if self.validator.is_none() {
            self.validator.set_default();
        }
        self.validator.as_mut().unwrap()
    }

    // Take field
    pub fn take_validator(&mut self) -> Validator {
        self.validator.take().unwrap_or_else(|| Validator::new())
    }

    pub fn get_validator(&self) -> &Validator {
        self.validator.as_ref().unwrap_or_else(|| Validator::default_instance())
    }

    // int64 height = 3;

    pub fn clear_height(&mut self) {
        self.height = 0;
    }

    // Param is passed by value, moved
    pub fn set_height(&mut self, v: i64) {
        self.height = v;
    }

    pub fn get_height(&self) -> i64 {
        self.height
    }

    // .google.protobuf.Timestamp time = 4;

    pub fn clear_time(&mut self) {
        self.time.clear();
    }

    pub fn has_time(&self) -> bool {
        self.time.is_some()
    }

    // Param is passed by value, moved
    pub fn set_time(&mut self, v: ::protobuf::well_known_types::Timestamp) {
        self.time = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_time(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
        if self.time.is_none() {
            self.time.set_default();
        }
        self.time.as_mut().unwrap()
    }

    // Take field
    pub fn take_time(&mut self) -> ::protobuf::well_known_types::Timestamp {
        self.time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
    }

    pub fn get_time(&self) -> &::protobuf::well_known_types::Timestamp {
        self.time.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance())
    }

    // int64 total_voting_power = 5;

    pub fn clear_total_voting_power(&mut self) {
        self.total_voting_power = 0;
    }

    // Param is passed by value, moved
    pub fn set_total_voting_power(&mut self, v: i64) {
        self.total_voting_power = v;
    }

    pub fn get_total_voting_power(&self) -> i64 {
        self.total_voting_power
    }
}

impl ::protobuf::Message for Evidence {
    fn is_initialized(&self) -> bool {
        for v in &self.validator {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.time {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.validator)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.height = tmp;
                },
                4 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.time)?;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.total_voting_power = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.field_type.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.field_type);
        }
        if let Some(ref v) = self.validator.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if self.height != 0 {
            my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.time.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if self.total_voting_power != 0 {
            my_size += ::protobuf::rt::value_size(5, self.total_voting_power, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.field_type.is_empty() {
            os.write_string(1, &self.field_type)?;
        }
        if let Some(ref v) = self.validator.as_ref() {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if self.height != 0 {
            os.write_int64(3, self.height)?;
        }
        if let Some(ref v) = self.time.as_ref() {
            os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if self.total_voting_power != 0 {
            os.write_int64(5, self.total_voting_power)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> Evidence {
        Evidence::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "type",
                    |m: &Evidence| { &m.field_type },
                    |m: &mut Evidence| { &mut m.field_type },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Validator>>(
                    "validator",
                    |m: &Evidence| { &m.validator },
                    |m: &mut Evidence| { &mut m.validator },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "height",
                    |m: &Evidence| { &m.height },
                    |m: &mut Evidence| { &mut m.height },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
                    "time",
                    |m: &Evidence| { &m.time },
                    |m: &mut Evidence| { &mut m.time },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                    "total_voting_power",
                    |m: &Evidence| { &m.total_voting_power },
                    |m: &mut Evidence| { &mut m.total_voting_power },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<Evidence>(
                    "Evidence",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static Evidence {
        static mut instance: ::protobuf::lazy::Lazy<Evidence> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const Evidence,
        };
        unsafe {
            instance.get(Evidence::new)
        }
    }
}

impl ::protobuf::Clear for Evidence {
    fn clear(&mut self) {
        self.clear_field_type();
        self.clear_validator();
        self.clear_height();
        self.clear_time();
        self.clear_total_voting_power();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for Evidence {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Evidence {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x0btypes.proto\x12\x05types\"\x90\x04\n\x07Request\x12&\n\x04echo\x18\
    \x02\x20\x01(\x0b2\x12.types.RequestEchoH\0B\x02\x18\0\x12(\n\x05flush\
    \x18\x03\x20\x01(\x0b2\x13.types.RequestFlushH\0B\x02\x18\0\x12&\n\x04in\
    fo\x18\x04\x20\x01(\x0b2\x12.types.RequestInfoH\0B\x02\x18\0\x121\n\nset\
    _option\x18\x05\x20\x01(\x0b2\x17.types.RequestSetOptionH\0B\x02\x18\0\
    \x121\n\ninit_chain\x18\x06\x20\x01(\x0b2\x17.types.RequestInitChainH\0B\
    \x02\x18\0\x12(\n\x05query\x18\x07\x20\x01(\x0b2\x13.types.RequestQueryH\
    \0B\x02\x18\0\x123\n\x0bbegin_block\x18\x08\x20\x01(\x0b2\x18.types.Requ\
    estBeginBlockH\0B\x02\x18\0\x12-\n\x08check_tx\x18\t\x20\x01(\x0b2\x15.t\
    ypes.RequestCheckTxH\0B\x02\x18\0\x121\n\ndeliver_tx\x18\x13\x20\x01(\
    \x0b2\x17.types.RequestDeliverTxH\0B\x02\x18\0\x12/\n\tend_block\x18\x0b\
    \x20\x01(\x0b2\x16.types.RequestEndBlockH\0B\x02\x18\0\x12*\n\x06commit\
    \x18\x0c\x20\x01(\x0b2\x14.types.RequestCommitH\0B\x02\x18\0B\x07\n\x05v\
    alue\"\"\n\x0bRequestEcho\x12\x13\n\x07message\x18\x01\x20\x01(\tB\x02\
    \x18\0\"\x0e\n\x0cRequestFlush\"\"\n\x0bRequestInfo\x12\x13\n\x07version\
    \x18\x01\x20\x01(\tB\x02\x18\0\"6\n\x10RequestSetOption\x12\x0f\n\x03key\
    \x18\x01\x20\x01(\tB\x02\x18\0\x12\x11\n\x05value\x18\x02\x20\x01(\tB\
    \x02\x18\0\"\xd9\x01\n\x10RequestInitChain\x12,\n\x04time\x18\x01\x20\
    \x01(\x0b2\x1a.google.protobuf.TimestampB\x02\x18\0\x12\x14\n\x08chain_i\
    d\x18\x02\x20\x01(\tB\x02\x18\0\x124\n\x10consensus_params\x18\x03\x20\
    \x01(\x0b2\x16.types.ConsensusParamsB\x02\x18\0\x12.\n\nvalidators\x18\
    \x04\x20\x03(\x0b2\x16.types.ValidatorUpdateB\x02\x18\0\x12\x1b\n\x0fapp\
    _state_bytes\x18\x05\x20\x01(\x0cB\x02\x18\0\"Y\n\x0cRequestQuery\x12\
    \x10\n\x04data\x18\x01\x20\x01(\x0cB\x02\x18\0\x12\x10\n\x04path\x18\x02\
    \x20\x01(\tB\x02\x18\0\x12\x12\n\x06height\x18\x03\x20\x01(\x03B\x02\x18\
    \0\x12\x11\n\x05prove\x18\x04\x20\x01(\x08B\x02\x18\0\"\xb0\x01\n\x11Req\
    uestBeginBlock\x12\x10\n\x04hash\x18\x01\x20\x01(\x0cB\x02\x18\0\x12!\n\
    \x06header\x18\x02\x20\x01(\x0b2\r.types.HeaderB\x02\x18\0\x123\n\x10las\
    t_commit_info\x18\x03\x20\x01(\x0b2\x15.types.LastCommitInfoB\x02\x18\0\
    \x121\n\x14byzantine_validators\x18\x04\x20\x03(\x0b2\x0f.types.Evidence\
    B\x02\x18\0\"\x20\n\x0eRequestCheckTx\x12\x0e\n\x02tx\x18\x01\x20\x01(\
    \x0cB\x02\x18\0\"\"\n\x10RequestDeliverTx\x12\x0e\n\x02tx\x18\x01\x20\
    \x01(\x0cB\x02\x18\0\"%\n\x0fRequestEndBlock\x12\x12\n\x06height\x18\x01\
    \x20\x01(\x03B\x02\x18\0\"\x0f\n\rRequestCommit\"\xcf\x04\n\x08Response\
    \x121\n\texception\x18\x01\x20\x01(\x0b2\x18.types.ResponseExceptionH\0B\
    \x02\x18\0\x12'\n\x04echo\x18\x02\x20\x01(\x0b2\x13.types.ResponseEchoH\
    \0B\x02\x18\0\x12)\n\x05flush\x18\x03\x20\x01(\x0b2\x14.types.ResponseFl\
    ushH\0B\x02\x18\0\x12'\n\x04info\x18\x04\x20\x01(\x0b2\x13.types.Respons\
    eInfoH\0B\x02\x18\0\x122\n\nset_option\x18\x05\x20\x01(\x0b2\x18.types.R\
    esponseSetOptionH\0B\x02\x18\0\x122\n\ninit_chain\x18\x06\x20\x01(\x0b2\
    \x18.types.ResponseInitChainH\0B\x02\x18\0\x12)\n\x05query\x18\x07\x20\
    \x01(\x0b2\x14.types.ResponseQueryH\0B\x02\x18\0\x124\n\x0bbegin_block\
    \x18\x08\x20\x01(\x0b2\x19.types.ResponseBeginBlockH\0B\x02\x18\0\x12.\n\
    \x08check_tx\x18\t\x20\x01(\x0b2\x16.types.ResponseCheckTxH\0B\x02\x18\0\
    \x122\n\ndeliver_tx\x18\n\x20\x01(\x0b2\x18.types.ResponseDeliverTxH\0B\
    \x02\x18\0\x120\n\tend_block\x18\x0b\x20\x01(\x0b2\x17.types.ResponseEnd\
    BlockH\0B\x02\x18\0\x12+\n\x06commit\x18\x0c\x20\x01(\x0b2\x15.types.Res\
    ponseCommitH\0B\x02\x18\0B\x07\n\x05value\"&\n\x11ResponseException\x12\
    \x11\n\x05error\x18\x01\x20\x01(\tB\x02\x18\0\"#\n\x0cResponseEcho\x12\
    \x13\n\x07message\x18\x01\x20\x01(\tB\x02\x18\0\"\x0f\n\rResponseFlush\"\
    u\n\x0cResponseInfo\x12\x10\n\x04data\x18\x01\x20\x01(\tB\x02\x18\0\x12\
    \x13\n\x07version\x18\x02\x20\x01(\tB\x02\x18\0\x12\x1d\n\x11last_block_\
    height\x18\x03\x20\x01(\x03B\x02\x18\0\x12\x1f\n\x13last_block_app_hash\
    \x18\x04\x20\x01(\x0cB\x02\x18\0\"H\n\x11ResponseSetOption\x12\x10\n\x04\
    code\x18\x01\x20\x01(\rB\x02\x18\0\x12\x0f\n\x03log\x18\x03\x20\x01(\tB\
    \x02\x18\0\x12\x10\n\x04info\x18\x04\x20\x01(\tB\x02\x18\0\"y\n\x11Respo\
    nseInitChain\x124\n\x10consensus_params\x18\x01\x20\x01(\x0b2\x16.types.\
    ConsensusParamsB\x02\x18\0\x12.\n\nvalidators\x18\x02\x20\x03(\x0b2\x16.\
    types.ValidatorUpdateB\x02\x18\0\"\xa2\x01\n\rResponseQuery\x12\x10\n\
    \x04code\x18\x01\x20\x01(\rB\x02\x18\0\x12\x0f\n\x03log\x18\x03\x20\x01(\
    \tB\x02\x18\0\x12\x10\n\x04info\x18\x04\x20\x01(\tB\x02\x18\0\x12\x11\n\
    \x05index\x18\x05\x20\x01(\x03B\x02\x18\0\x12\x0f\n\x03key\x18\x06\x20\
    \x01(\x0cB\x02\x18\0\x12\x11\n\x05value\x18\x07\x20\x01(\x0cB\x02\x18\0\
    \x12\x11\n\x05proof\x18\x08\x20\x01(\x0cB\x02\x18\0\x12\x12\n\x06height\
    \x18\t\x20\x01(\x03B\x02\x18\0\"6\n\x12ResponseBeginBlock\x12\x20\n\x04t\
    ags\x18\x01\x20\x03(\x0b2\x0e.common.KVPairB\x02\x18\0\"\xa8\x01\n\x0fRe\
    sponseCheckTx\x12\x10\n\x04code\x18\x01\x20\x01(\rB\x02\x18\0\x12\x10\n\
    \x04data\x18\x02\x20\x01(\x0cB\x02\x18\0\x12\x0f\n\x03log\x18\x03\x20\
    \x01(\tB\x02\x18\0\x12\x10\n\x04info\x18\x04\x20\x01(\tB\x02\x18\0\x12\
    \x16\n\ngas_wanted\x18\x05\x20\x01(\x03B\x02\x18\0\x12\x14\n\x08gas_used\
    \x18\x06\x20\x01(\x03B\x02\x18\0\x12\x20\n\x04tags\x18\x07\x20\x03(\x0b2\
    \x0e.common.KVPairB\x02\x18\0\"\xaa\x01\n\x11ResponseDeliverTx\x12\x10\n\
    \x04code\x18\x01\x20\x01(\rB\x02\x18\0\x12\x10\n\x04data\x18\x02\x20\x01\
    (\x0cB\x02\x18\0\x12\x0f\n\x03log\x18\x03\x20\x01(\tB\x02\x18\0\x12\x10\
    \n\x04info\x18\x04\x20\x01(\tB\x02\x18\0\x12\x16\n\ngas_wanted\x18\x05\
    \x20\x01(\x03B\x02\x18\0\x12\x14\n\x08gas_used\x18\x06\x20\x01(\x03B\x02\
    \x18\0\x12\x20\n\x04tags\x18\x07\x20\x03(\x0b2\x0e.common.KVPairB\x02\
    \x18\0\"\xa8\x01\n\x10ResponseEndBlock\x125\n\x11validator_updates\x18\
    \x01\x20\x03(\x0b2\x16.types.ValidatorUpdateB\x02\x18\0\x12;\n\x17consen\
    sus_param_updates\x18\x02\x20\x01(\x0b2\x16.types.ConsensusParamsB\x02\
    \x18\0\x12\x20\n\x04tags\x18\x03\x20\x03(\x0b2\x0e.common.KVPairB\x02\
    \x18\0\"\"\n\x0eResponseCommit\x12\x10\n\x04data\x18\x02\x20\x01(\x0cB\
    \x02\x18\0\"o\n\x0fConsensusParams\x12(\n\nblock_size\x18\x01\x20\x01(\
    \x0b2\x10.types.BlockSizeB\x02\x18\0\x122\n\x0fevidence_params\x18\x02\
    \x20\x01(\x0b2\x15.types.EvidenceParamsB\x02\x18\0\"7\n\tBlockSize\x12\
    \x15\n\tmax_bytes\x18\x01\x20\x01(\x03B\x02\x18\0\x12\x13\n\x07max_gas\
    \x18\x02\x20\x01(\x03B\x02\x18\0\"%\n\x0eEvidenceParams\x12\x13\n\x07max\
    _age\x18\x01\x20\x01(\x03B\x02\x18\0\"G\n\x0eLastCommitInfo\x12\x11\n\
    \x05round\x18\x01\x20\x01(\x05B\x02\x18\0\x12\"\n\x05votes\x18\x02\x20\
    \x03(\x0b2\x0f.types.VoteInfoB\x02\x18\0\"\xb5\x03\n\x06Header\x12\x14\n\
    \x08chain_id\x18\x01\x20\x01(\tB\x02\x18\0\x12\x12\n\x06height\x18\x02\
    \x20\x01(\x03B\x02\x18\0\x12,\n\x04time\x18\x03\x20\x01(\x0b2\x1a.google\
    .protobuf.TimestampB\x02\x18\0\x12\x13\n\x07num_txs\x18\x04\x20\x01(\x03\
    B\x02\x18\0\x12\x15\n\ttotal_txs\x18\x05\x20\x01(\x03B\x02\x18\0\x12)\n\
    \rlast_block_id\x18\x06\x20\x01(\x0b2\x0e.types.BlockIDB\x02\x18\0\x12\
    \x1c\n\x10last_commit_hash\x18\x07\x20\x01(\x0cB\x02\x18\0\x12\x15\n\tda\
    ta_hash\x18\x08\x20\x01(\x0cB\x02\x18\0\x12\x1b\n\x0fvalidators_hash\x18\
    \t\x20\x01(\x0cB\x02\x18\0\x12\x20\n\x14next_validators_hash\x18\n\x20\
    \x01(\x0cB\x02\x18\0\x12\x1a\n\x0econsensus_hash\x18\x0b\x20\x01(\x0cB\
    \x02\x18\0\x12\x14\n\x08app_hash\x18\x0c\x20\x01(\x0cB\x02\x18\0\x12\x1d\
    \n\x11last_results_hash\x18\r\x20\x01(\x0cB\x02\x18\0\x12\x19\n\revidenc\
    e_hash\x18\x0e\x20\x01(\x0cB\x02\x18\0\x12\x1c\n\x10proposer_address\x18\
    \x0f\x20\x01(\x0cB\x02\x18\0\"K\n\x07BlockID\x12\x10\n\x04hash\x18\x01\
    \x20\x01(\x0cB\x02\x18\0\x12.\n\x0cparts_header\x18\x02\x20\x01(\x0b2\
    \x14.types.PartSetHeaderB\x02\x18\0\"4\n\rPartSetHeader\x12\x11\n\x05tot\
    al\x18\x01\x20\x01(\x05B\x02\x18\0\x12\x10\n\x04hash\x18\x02\x20\x01(\
    \x0cB\x02\x18\0\"3\n\tValidator\x12\x13\n\x07address\x18\x01\x20\x01(\
    \x0cB\x02\x18\0\x12\x11\n\x05power\x18\x03\x20\x01(\x03B\x02\x18\0\"H\n\
    \x0fValidatorUpdate\x12\"\n\x07pub_key\x18\x01\x20\x01(\x0b2\r.types.Pub\
    KeyB\x02\x18\0\x12\x11\n\x05power\x18\x02\x20\x01(\x03B\x02\x18\0\"R\n\
    \x08VoteInfo\x12'\n\tvalidator\x18\x01\x20\x01(\x0b2\x10.types.Validator\
    B\x02\x18\0\x12\x1d\n\x11signed_last_block\x18\x02\x20\x01(\x08B\x02\x18\
    \0\",\n\x06PubKey\x12\x10\n\x04type\x18\x01\x20\x01(\tB\x02\x18\0\x12\
    \x10\n\x04data\x18\x02\x20\x01(\x0cB\x02\x18\0\"\xa7\x01\n\x08Evidence\
    \x12\x10\n\x04type\x18\x01\x20\x01(\tB\x02\x18\0\x12'\n\tvalidator\x18\
    \x02\x20\x01(\x0b2\x10.types.ValidatorB\x02\x18\0\x12\x12\n\x06height\
    \x18\x03\x20\x01(\x03B\x02\x18\0\x12,\n\x04time\x18\x04\x20\x01(\x0b2\
    \x1a.google.protobuf.TimestampB\x02\x18\0\x12\x1e\n\x12total_voting_powe\
    r\x18\x05\x20\x01(\x03B\x02\x18\0B\x1c\xc8\xe2\x1e\x01\xd0\xe2\x1e\x01\
    \xa8\xe2\x1e\x01\xf8\xe1\x1e\x01\xc0\xe3\x1e\x01\xb8\xe2\x1e\x01\xe0\xe2\
    \x1e\x01b\x06proto3\
";

static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
    lock: ::protobuf::lazy::ONCE_INIT,
    ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    unsafe {
        file_descriptor_proto_lazy.get(|| {
            parse_descriptor_proto()
        })
    }
}