// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated

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

#![allow(unused_attributes)]
#![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(unused_imports)]
#![allow(unused_results)]
//! Generated file from `text_block_info.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;

#[derive(PartialEq,Clone,Default)]
pub struct CreateTextBlockParams {
    // message fields
    pub id: ::std::string::String,
    pub revisions: ::protobuf::SingularPtrField<super::revision::RepeatedRevision>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a CreateTextBlockParams {
    fn default() -> &'a CreateTextBlockParams {
        <CreateTextBlockParams as ::protobuf::Message>::default_instance()
    }
}

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

    // string id = 1;


    pub fn get_id(&self) -> &str {
        &self.id
    }
    pub fn clear_id(&mut self) {
        self.id.clear();
    }

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

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

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

    // .RepeatedRevision revisions = 2;


    pub fn get_revisions(&self) -> &super::revision::RepeatedRevision {
        self.revisions.as_ref().unwrap_or_else(|| <super::revision::RepeatedRevision as ::protobuf::Message>::default_instance())
    }
    pub fn clear_revisions(&mut self) {
        self.revisions.clear();
    }

    pub fn has_revisions(&self) -> bool {
        self.revisions.is_some()
    }

    // Param is passed by value, moved
    pub fn set_revisions(&mut self, v: super::revision::RepeatedRevision) {
        self.revisions = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_revisions(&mut self) -> &mut super::revision::RepeatedRevision {
        if self.revisions.is_none() {
            self.revisions.set_default();
        }
        self.revisions.as_mut().unwrap()
    }

    // Take field
    pub fn take_revisions(&mut self) -> super::revision::RepeatedRevision {
        self.revisions.take().unwrap_or_else(|| super::revision::RepeatedRevision::new())
    }
}

impl ::protobuf::Message for CreateTextBlockParams {
    fn is_initialized(&self) -> bool {
        for v in &self.revisions {
            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.id)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.revisions)?;
                },
                _ => {
                    ::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.id.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.id);
        }
        if let Some(ref v) = self.revisions.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.id.is_empty() {
            os.write_string(1, &self.id)?;
        }
        if let Some(ref v) = self.revisions.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) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

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

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

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "id",
                |m: &CreateTextBlockParams| { &m.id },
                |m: &mut CreateTextBlockParams| { &mut m.id },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::revision::RepeatedRevision>>(
                "revisions",
                |m: &CreateTextBlockParams| { &m.revisions },
                |m: &mut CreateTextBlockParams| { &mut m.revisions },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateTextBlockParams>(
                "CreateTextBlockParams",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static CreateTextBlockParams {
        static instance: ::protobuf::rt::LazyV2<CreateTextBlockParams> = ::protobuf::rt::LazyV2::INIT;
        instance.get(CreateTextBlockParams::new)
    }
}

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

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

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

#[derive(PartialEq,Clone,Default)]
pub struct TextBlockInfo {
    // message fields
    pub block_id: ::std::string::String,
    pub text: ::std::string::String,
    pub rev_id: i64,
    pub base_rev_id: i64,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a TextBlockInfo {
    fn default() -> &'a TextBlockInfo {
        <TextBlockInfo as ::protobuf::Message>::default_instance()
    }
}

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

    // string block_id = 1;


    pub fn get_block_id(&self) -> &str {
        &self.block_id
    }
    pub fn clear_block_id(&mut self) {
        self.block_id.clear();
    }

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

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

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

    // string text = 2;


    pub fn get_text(&self) -> &str {
        &self.text
    }
    pub fn clear_text(&mut self) {
        self.text.clear();
    }

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

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

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

    // int64 rev_id = 3;


    pub fn get_rev_id(&self) -> i64 {
        self.rev_id
    }
    pub fn clear_rev_id(&mut self) {
        self.rev_id = 0;
    }

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

    // int64 base_rev_id = 4;


    pub fn get_base_rev_id(&self) -> i64 {
        self.base_rev_id
    }
    pub fn clear_base_rev_id(&mut self) {
        self.base_rev_id = 0;
    }

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

impl ::protobuf::Message for TextBlockInfo {
    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.block_id)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.text)?;
                },
                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.rev_id = 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_int64()?;
                    self.base_rev_id = 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.block_id.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.block_id);
        }
        if !self.text.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.text);
        }
        if self.rev_id != 0 {
            my_size += ::protobuf::rt::value_size(3, self.rev_id, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.base_rev_id != 0 {
            my_size += ::protobuf::rt::value_size(4, self.base_rev_id, ::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.block_id.is_empty() {
            os.write_string(1, &self.block_id)?;
        }
        if !self.text.is_empty() {
            os.write_string(2, &self.text)?;
        }
        if self.rev_id != 0 {
            os.write_int64(3, self.rev_id)?;
        }
        if self.base_rev_id != 0 {
            os.write_int64(4, self.base_rev_id)?;
        }
        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) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

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

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

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "block_id",
                |m: &TextBlockInfo| { &m.block_id },
                |m: &mut TextBlockInfo| { &mut m.block_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "text",
                |m: &TextBlockInfo| { &m.text },
                |m: &mut TextBlockInfo| { &mut m.text },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                "rev_id",
                |m: &TextBlockInfo| { &m.rev_id },
                |m: &mut TextBlockInfo| { &mut m.rev_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                "base_rev_id",
                |m: &TextBlockInfo| { &m.base_rev_id },
                |m: &mut TextBlockInfo| { &mut m.base_rev_id },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<TextBlockInfo>(
                "TextBlockInfo",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static TextBlockInfo {
        static instance: ::protobuf::rt::LazyV2<TextBlockInfo> = ::protobuf::rt::LazyV2::INIT;
        instance.get(TextBlockInfo::new)
    }
}

impl ::protobuf::Clear for TextBlockInfo {
    fn clear(&mut self) {
        self.block_id.clear();
        self.text.clear();
        self.rev_id = 0;
        self.base_rev_id = 0;
        self.unknown_fields.clear();
    }
}

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

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

#[derive(PartialEq,Clone,Default)]
pub struct ResetTextBlockParams {
    // message fields
    pub block_id: ::std::string::String,
    pub revisions: ::protobuf::SingularPtrField<super::revision::RepeatedRevision>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a ResetTextBlockParams {
    fn default() -> &'a ResetTextBlockParams {
        <ResetTextBlockParams as ::protobuf::Message>::default_instance()
    }
}

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

    // string block_id = 1;


    pub fn get_block_id(&self) -> &str {
        &self.block_id
    }
    pub fn clear_block_id(&mut self) {
        self.block_id.clear();
    }

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

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

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

    // .RepeatedRevision revisions = 2;


    pub fn get_revisions(&self) -> &super::revision::RepeatedRevision {
        self.revisions.as_ref().unwrap_or_else(|| <super::revision::RepeatedRevision as ::protobuf::Message>::default_instance())
    }
    pub fn clear_revisions(&mut self) {
        self.revisions.clear();
    }

    pub fn has_revisions(&self) -> bool {
        self.revisions.is_some()
    }

    // Param is passed by value, moved
    pub fn set_revisions(&mut self, v: super::revision::RepeatedRevision) {
        self.revisions = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_revisions(&mut self) -> &mut super::revision::RepeatedRevision {
        if self.revisions.is_none() {
            self.revisions.set_default();
        }
        self.revisions.as_mut().unwrap()
    }

    // Take field
    pub fn take_revisions(&mut self) -> super::revision::RepeatedRevision {
        self.revisions.take().unwrap_or_else(|| super::revision::RepeatedRevision::new())
    }
}

impl ::protobuf::Message for ResetTextBlockParams {
    fn is_initialized(&self) -> bool {
        for v in &self.revisions {
            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.block_id)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.revisions)?;
                },
                _ => {
                    ::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.block_id.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.block_id);
        }
        if let Some(ref v) = self.revisions.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.block_id.is_empty() {
            os.write_string(1, &self.block_id)?;
        }
        if let Some(ref v) = self.revisions.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) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

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

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

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "block_id",
                |m: &ResetTextBlockParams| { &m.block_id },
                |m: &mut ResetTextBlockParams| { &mut m.block_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::revision::RepeatedRevision>>(
                "revisions",
                |m: &ResetTextBlockParams| { &m.revisions },
                |m: &mut ResetTextBlockParams| { &mut m.revisions },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ResetTextBlockParams>(
                "ResetTextBlockParams",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static ResetTextBlockParams {
        static instance: ::protobuf::rt::LazyV2<ResetTextBlockParams> = ::protobuf::rt::LazyV2::INIT;
        instance.get(ResetTextBlockParams::new)
    }
}

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

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

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

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

impl<'a> ::std::default::Default for &'a TextBlockDelta {
    fn default() -> &'a TextBlockDelta {
        <TextBlockDelta as ::protobuf::Message>::default_instance()
    }
}

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

    // string block_id = 1;


    pub fn get_block_id(&self) -> &str {
        &self.block_id
    }
    pub fn clear_block_id(&mut self) {
        self.block_id.clear();
    }

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

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

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

    // string delta_str = 2;


    pub fn get_delta_str(&self) -> &str {
        &self.delta_str
    }
    pub fn clear_delta_str(&mut self) {
        self.delta_str.clear();
    }

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

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

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

impl ::protobuf::Message for TextBlockDelta {
    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.block_id)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.delta_str)?;
                },
                _ => {
                    ::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.block_id.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.block_id);
        }
        if !self.delta_str.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.delta_str);
        }
        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.block_id.is_empty() {
            os.write_string(1, &self.block_id)?;
        }
        if !self.delta_str.is_empty() {
            os.write_string(2, &self.delta_str)?;
        }
        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) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

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

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

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "block_id",
                |m: &TextBlockDelta| { &m.block_id },
                |m: &mut TextBlockDelta| { &mut m.block_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "delta_str",
                |m: &TextBlockDelta| { &m.delta_str },
                |m: &mut TextBlockDelta| { &mut m.delta_str },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<TextBlockDelta>(
                "TextBlockDelta",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static TextBlockDelta {
        static instance: ::protobuf::rt::LazyV2<TextBlockDelta> = ::protobuf::rt::LazyV2::INIT;
        instance.get(TextBlockDelta::new)
    }
}

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

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

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

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

impl<'a> ::std::default::Default for &'a NewDocUser {
    fn default() -> &'a NewDocUser {
        <NewDocUser as ::protobuf::Message>::default_instance()
    }
}

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

    // string user_id = 1;


    pub fn get_user_id(&self) -> &str {
        &self.user_id
    }
    pub fn clear_user_id(&mut self) {
        self.user_id.clear();
    }

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

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

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

    // int64 rev_id = 2;


    pub fn get_rev_id(&self) -> i64 {
        self.rev_id
    }
    pub fn clear_rev_id(&mut self) {
        self.rev_id = 0;
    }

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

    // string doc_id = 3;


    pub fn get_doc_id(&self) -> &str {
        &self.doc_id
    }
    pub fn clear_doc_id(&mut self) {
        self.doc_id.clear();
    }

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

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

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

impl ::protobuf::Message for NewDocUser {
    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.user_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.rev_id = tmp;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.doc_id)?;
                },
                _ => {
                    ::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.user_id.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.user_id);
        }
        if self.rev_id != 0 {
            my_size += ::protobuf::rt::value_size(2, self.rev_id, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.doc_id.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.doc_id);
        }
        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.user_id.is_empty() {
            os.write_string(1, &self.user_id)?;
        }
        if self.rev_id != 0 {
            os.write_int64(2, self.rev_id)?;
        }
        if !self.doc_id.is_empty() {
            os.write_string(3, &self.doc_id)?;
        }
        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) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

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

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

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "user_id",
                |m: &NewDocUser| { &m.user_id },
                |m: &mut NewDocUser| { &mut m.user_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                "rev_id",
                |m: &NewDocUser| { &m.rev_id },
                |m: &mut NewDocUser| { &mut m.rev_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "doc_id",
                |m: &NewDocUser| { &m.doc_id },
                |m: &mut NewDocUser| { &mut m.doc_id },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<NewDocUser>(
                "NewDocUser",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static NewDocUser {
        static instance: ::protobuf::rt::LazyV2<NewDocUser> = ::protobuf::rt::LazyV2::INIT;
        instance.get(NewDocUser::new)
    }
}

impl ::protobuf::Clear for NewDocUser {
    fn clear(&mut self) {
        self.user_id.clear();
        self.rev_id = 0;
        self.doc_id.clear();
        self.unknown_fields.clear();
    }
}

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

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

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

impl<'a> ::std::default::Default for &'a TextBlockId {
    fn default() -> &'a TextBlockId {
        <TextBlockId as ::protobuf::Message>::default_instance()
    }
}

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

    // string value = 1;


    pub fn get_value(&self) -> &str {
        &self.value
    }
    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())
    }
}

impl ::protobuf::Message for TextBlockId {
    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.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.value.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &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.value.is_empty() {
            os.write_string(1, &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) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

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

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

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "value",
                |m: &TextBlockId| { &m.value },
                |m: &mut TextBlockId| { &mut m.value },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<TextBlockId>(
                "TextBlockId",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static TextBlockId {
        static instance: ::protobuf::rt::LazyV2<TextBlockId> = ::protobuf::rt::LazyV2::INIT;
        instance.get(TextBlockId::new)
    }
}

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

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x15text_block_info.proto\x1a\x0erevision.proto\"X\n\x15CreateTextBloc\
    kParams\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12/\n\trevisions\x18\
    \x02\x20\x01(\x0b2\x11.RepeatedRevisionR\trevisions\"u\n\rTextBlockInfo\
    \x12\x19\n\x08block_id\x18\x01\x20\x01(\tR\x07blockId\x12\x12\n\x04text\
    \x18\x02\x20\x01(\tR\x04text\x12\x15\n\x06rev_id\x18\x03\x20\x01(\x03R\
    \x05revId\x12\x1e\n\x0bbase_rev_id\x18\x04\x20\x01(\x03R\tbaseRevId\"b\n\
    \x14ResetTextBlockParams\x12\x19\n\x08block_id\x18\x01\x20\x01(\tR\x07bl\
    ockId\x12/\n\trevisions\x18\x02\x20\x01(\x0b2\x11.RepeatedRevisionR\trev\
    isions\"H\n\x0eTextBlockDelta\x12\x19\n\x08block_id\x18\x01\x20\x01(\tR\
    \x07blockId\x12\x1b\n\tdelta_str\x18\x02\x20\x01(\tR\x08deltaStr\"S\n\nN\
    ewDocUser\x12\x17\n\x07user_id\x18\x01\x20\x01(\tR\x06userId\x12\x15\n\
    \x06rev_id\x18\x02\x20\x01(\x03R\x05revId\x12\x15\n\x06doc_id\x18\x03\
    \x20\x01(\tR\x05docId\"#\n\x0bTextBlockId\x12\x14\n\x05value\x18\x01\x20\
    \x01(\tR\x05valueb\x06proto3\
";

static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    file_descriptor_proto_lazy.get(|| {
        parse_descriptor_proto()
    })
}
