Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: ignore rust's protobuf crate

appflowy94276d438d0a
diff --git a/.gitignore b/.gitignore
index cbfc0588b0..566151d549 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,4 +17,6 @@ yarn.lock
node_modules
**/.proto_cache
**/.cache
-**/.DS_Store
\ No newline at end of file
+**/.DS_Store
+
+**/src/protobuf
\ No newline at end of file
diff --git a/frontend/rust-lib/.gitignore b/frontend/rust-lib/.gitignore
index 6a492f9bfd..94881e398a 100644
--- a/frontend/rust-lib/.gitignore
+++ b/frontend/rust-lib/.gitignore
@@ -10,5 +10,5 @@
**/**/*.log*
**/**/temp
bin/
-
+**/src/protobuf
.idea/
\ No newline at end of file
diff --git a/frontend/rust-lib/dart-ffi/src/protobuf/mod.rs b/frontend/rust-lib/dart-ffi/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/frontend/rust-lib/dart-ffi/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_request.rs b/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_request.rs
deleted file mode 100644
index 61e77820dd..0000000000
--- a/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_request.rs
+++ /dev/null
@@ -1,243 +0,0 @@
-// 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 `ffi_request.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 FFIRequest {
- // message fields
- pub event: ::std::string::String,
- pub payload: ::std::vec::Vec<u8>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a FFIRequest {
- fn default() -> &'a FFIRequest {
- <FFIRequest as ::protobuf::Message>::default_instance()
- }
-}
-
-impl FFIRequest {
- pub fn new() -> FFIRequest {
- ::std::default::Default::default()
- }
-
- // string event = 1;
-
-
- pub fn get_event(&self) -> &str {
- &self.event
- }
- pub fn clear_event(&mut self) {
- self.event.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_event(&mut self, v: ::std::string::String) {
- self.event = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_event(&mut self) -> &mut ::std::string::String {
- &mut self.event
- }
-
- // Take field
- pub fn take_event(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.event, ::std::string::String::new())
- }
-
- // bytes payload = 2;
-
-
- pub fn get_payload(&self) -> &[u8] {
- &self.payload
- }
- pub fn clear_payload(&mut self) {
- self.payload.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_payload(&mut self, v: ::std::vec::Vec<u8>) {
- self.payload = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_payload(&mut self) -> &mut ::std::vec::Vec<u8> {
- &mut self.payload
- }
-
- // Take field
- pub fn take_payload(&mut self) -> ::std::vec::Vec<u8> {
- ::std::mem::replace(&mut self.payload, ::std::vec::Vec::new())
- }
-}
-
-impl ::protobuf::Message for FFIRequest {
- 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.event)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.payload)?;
- },
- _ => {
- ::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.event.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.event);
- }
- if !self.payload.is_empty() {
- my_size += ::protobuf::rt::bytes_size(2, &self.payload);
- }
- 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.event.is_empty() {
- os.write_string(1, &self.event)?;
- }
- if !self.payload.is_empty() {
- os.write_bytes(2, &self.payload)?;
- }
- 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() -> FFIRequest {
- FFIRequest::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>(
- "event",
- |m: &FFIRequest| { &m.event },
- |m: &mut FFIRequest| { &mut m.event },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "payload",
- |m: &FFIRequest| { &m.payload },
- |m: &mut FFIRequest| { &mut m.payload },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<FFIRequest>(
- "FFIRequest",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static FFIRequest {
- static instance: ::protobuf::rt::LazyV2<FFIRequest> = ::protobuf::rt::LazyV2::INIT;
- instance.get(FFIRequest::new)
- }
-}
-
-impl ::protobuf::Clear for FFIRequest {
- fn clear(&mut self) {
- self.event.clear();
- self.payload.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for FFIRequest {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FFIRequest {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x11ffi_request.proto\"<\n\nFFIRequest\x12\x14\n\x05event\x18\x01\x20\
- \x01(\tR\x05event\x12\x18\n\x07payload\x18\x02\x20\x01(\x0cR\x07payloadb\
- \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()
- })
-}
diff --git a/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_response.rs b/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_response.rs
deleted file mode 100644
index 14d75265ec..0000000000
--- a/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_response.rs
+++ /dev/null
@@ -1,286 +0,0 @@
-// 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 `ffi_response.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 FFIResponse {
- // message fields
- pub payload: ::std::vec::Vec<u8>,
- pub code: FFIStatusCode,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a FFIResponse {
- fn default() -> &'a FFIResponse {
- <FFIResponse as ::protobuf::Message>::default_instance()
- }
-}
-
-impl FFIResponse {
- pub fn new() -> FFIResponse {
- ::std::default::Default::default()
- }
-
- // bytes payload = 1;
-
-
- pub fn get_payload(&self) -> &[u8] {
- &self.payload
- }
- pub fn clear_payload(&mut self) {
- self.payload.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_payload(&mut self, v: ::std::vec::Vec<u8>) {
- self.payload = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_payload(&mut self) -> &mut ::std::vec::Vec<u8> {
- &mut self.payload
- }
-
- // Take field
- pub fn take_payload(&mut self) -> ::std::vec::Vec<u8> {
- ::std::mem::replace(&mut self.payload, ::std::vec::Vec::new())
- }
-
- // .FFIStatusCode code = 2;
-
-
- pub fn get_code(&self) -> FFIStatusCode {
- self.code
- }
- pub fn clear_code(&mut self) {
- self.code = FFIStatusCode::Ok;
- }
-
- // Param is passed by value, moved
- pub fn set_code(&mut self, v: FFIStatusCode) {
- self.code = v;
- }
-}
-
-impl ::protobuf::Message for FFIResponse {
- 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.payload)?;
- },
- 2 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.code, 2, &mut self.unknown_fields)?
- },
- _ => {
- ::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.payload.is_empty() {
- my_size += ::protobuf::rt::bytes_size(1, &self.payload);
- }
- if self.code != FFIStatusCode::Ok {
- my_size += ::protobuf::rt::enum_size(2, self.code);
- }
- 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.payload.is_empty() {
- os.write_bytes(1, &self.payload)?;
- }
- if self.code != FFIStatusCode::Ok {
- os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.code))?;
- }
- 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() -> FFIResponse {
- FFIResponse::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::ProtobufTypeBytes>(
- "payload",
- |m: &FFIResponse| { &m.payload },
- |m: &mut FFIResponse| { &mut m.payload },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<FFIStatusCode>>(
- "code",
- |m: &FFIResponse| { &m.code },
- |m: &mut FFIResponse| { &mut m.code },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<FFIResponse>(
- "FFIResponse",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static FFIResponse {
- static instance: ::protobuf::rt::LazyV2<FFIResponse> = ::protobuf::rt::LazyV2::INIT;
- instance.get(FFIResponse::new)
- }
-}
-
-impl ::protobuf::Clear for FFIResponse {
- fn clear(&mut self) {
- self.payload.clear();
- self.code = FFIStatusCode::Ok;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for FFIResponse {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FFIResponse {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum FFIStatusCode {
- Ok = 0,
- Err = 1,
- Internal = 2,
-}
-
-impl ::protobuf::ProtobufEnum for FFIStatusCode {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<FFIStatusCode> {
- match value {
- 0 => ::std::option::Option::Some(FFIStatusCode::Ok),
- 1 => ::std::option::Option::Some(FFIStatusCode::Err),
- 2 => ::std::option::Option::Some(FFIStatusCode::Internal),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [FFIStatusCode] = &[
- FFIStatusCode::Ok,
- FFIStatusCode::Err,
- FFIStatusCode::Internal,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<FFIStatusCode>("FFIStatusCode", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for FFIStatusCode {
-}
-
-impl ::std::default::Default for FFIStatusCode {
- fn default() -> Self {
- FFIStatusCode::Ok
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FFIStatusCode {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x12ffi_response.proto\"K\n\x0bFFIResponse\x12\x18\n\x07payload\x18\
- \x01\x20\x01(\x0cR\x07payload\x12\"\n\x04code\x18\x02\x20\x01(\x0e2\x0e.\
- FFIStatusCodeR\x04code*.\n\rFFIStatusCode\x12\x06\n\x02Ok\x10\0\x12\x07\
- \n\x03Err\x10\x01\x12\x0c\n\x08Internal\x10\x02b\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()
- })
-}
diff --git a/frontend/rust-lib/dart-ffi/src/protobuf/model/mod.rs b/frontend/rust-lib/dart-ffi/src/protobuf/model/mod.rs
deleted file mode 100644
index 02f69483b5..0000000000
--- a/frontend/rust-lib/dart-ffi/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod ffi_response;
-pub use ffi_response::*;
-
-mod ffi_request;
-pub use ffi_request::*;
diff --git a/frontend/rust-lib/dart-notify/src/protobuf/mod.rs b/frontend/rust-lib/dart-notify/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/frontend/rust-lib/dart-notify/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/frontend/rust-lib/dart-notify/src/protobuf/model/mod.rs b/frontend/rust-lib/dart-notify/src/protobuf/model/mod.rs
deleted file mode 100644
index b1e402e076..0000000000
--- a/frontend/rust-lib/dart-notify/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod subject;
-pub use subject::*;
diff --git a/frontend/rust-lib/dart-notify/src/protobuf/model/subject.rs b/frontend/rust-lib/dart-notify/src/protobuf/model/subject.rs
deleted file mode 100644
index 29f2223b9a..0000000000
--- a/frontend/rust-lib/dart-notify/src/protobuf/model/subject.rs
+++ /dev/null
@@ -1,444 +0,0 @@
-// 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 `subject.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 SubscribeObject {
- // message fields
- pub source: ::std::string::String,
- pub ty: i32,
- pub id: ::std::string::String,
- // message oneof groups
- pub one_of_payload: ::std::option::Option<SubscribeObject_oneof_one_of_payload>,
- pub one_of_error: ::std::option::Option<SubscribeObject_oneof_one_of_error>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a SubscribeObject {
- fn default() -> &'a SubscribeObject {
- <SubscribeObject as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum SubscribeObject_oneof_one_of_payload {
- payload(::std::vec::Vec<u8>),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum SubscribeObject_oneof_one_of_error {
- error(::std::vec::Vec<u8>),
-}
-
-impl SubscribeObject {
- pub fn new() -> SubscribeObject {
- ::std::default::Default::default()
- }
-
- // string source = 1;
-
-
- pub fn get_source(&self) -> &str {
- &self.source
- }
- pub fn clear_source(&mut self) {
- self.source.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_source(&mut self, v: ::std::string::String) {
- self.source = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_source(&mut self) -> &mut ::std::string::String {
- &mut self.source
- }
-
- // Take field
- pub fn take_source(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.source, ::std::string::String::new())
- }
-
- // int32 ty = 2;
-
-
- pub fn get_ty(&self) -> i32 {
- self.ty
- }
- pub fn clear_ty(&mut self) {
- self.ty = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_ty(&mut self, v: i32) {
- self.ty = v;
- }
-
- // string id = 3;
-
-
- 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())
- }
-
- // bytes payload = 4;
-
-
- pub fn get_payload(&self) -> &[u8] {
- match self.one_of_payload {
- ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(ref v)) => v,
- _ => &[],
- }
- }
- pub fn clear_payload(&mut self) {
- self.one_of_payload = ::std::option::Option::None;
- }
-
- pub fn has_payload(&self) -> bool {
- match self.one_of_payload {
- ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_payload(&mut self, v: ::std::vec::Vec<u8>) {
- self.one_of_payload = ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_payload(&mut self) -> &mut ::std::vec::Vec<u8> {
- if let ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(_)) = self.one_of_payload {
- } else {
- self.one_of_payload = ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(::std::vec::Vec::new()));
- }
- match self.one_of_payload {
- ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_payload(&mut self) -> ::std::vec::Vec<u8> {
- if self.has_payload() {
- match self.one_of_payload.take() {
- ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::vec::Vec::new()
- }
- }
-
- // bytes error = 5;
-
-
- pub fn get_error(&self) -> &[u8] {
- match self.one_of_error {
- ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(ref v)) => v,
- _ => &[],
- }
- }
- pub fn clear_error(&mut self) {
- self.one_of_error = ::std::option::Option::None;
- }
-
- pub fn has_error(&self) -> bool {
- match self.one_of_error {
- ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_error(&mut self, v: ::std::vec::Vec<u8>) {
- self.one_of_error = ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_error(&mut self) -> &mut ::std::vec::Vec<u8> {
- if let ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(_)) = self.one_of_error {
- } else {
- self.one_of_error = ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(::std::vec::Vec::new()));
- }
- match self.one_of_error {
- ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_error(&mut self) -> ::std::vec::Vec<u8> {
- if self.has_error() {
- match self.one_of_error.take() {
- ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::vec::Vec::new()
- }
- }
-}
-
-impl ::protobuf::Message for SubscribeObject {
- 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.source)?;
- },
- 2 => {
- 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.ty = tmp;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_payload = ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(is.read_bytes()?));
- },
- 5 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_error = ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(is.read_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 !self.source.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.source);
- }
- if self.ty != 0 {
- my_size += ::protobuf::rt::value_size(2, self.ty, ::protobuf::wire_format::WireTypeVarint);
- }
- if !self.id.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.id);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_payload {
- match v {
- &SubscribeObject_oneof_one_of_payload::payload(ref v) => {
- my_size += ::protobuf::rt::bytes_size(4, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_error {
- match v {
- &SubscribeObject_oneof_one_of_error::error(ref v) => {
- my_size += ::protobuf::rt::bytes_size(5, &v);
- },
- };
- }
- 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.source.is_empty() {
- os.write_string(1, &self.source)?;
- }
- if self.ty != 0 {
- os.write_int32(2, self.ty)?;
- }
- if !self.id.is_empty() {
- os.write_string(3, &self.id)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_payload {
- match v {
- &SubscribeObject_oneof_one_of_payload::payload(ref v) => {
- os.write_bytes(4, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_error {
- match v {
- &SubscribeObject_oneof_one_of_error::error(ref v) => {
- os.write_bytes(5, v)?;
- },
- };
- }
- 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() -> SubscribeObject {
- SubscribeObject::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>(
- "source",
- |m: &SubscribeObject| { &m.source },
- |m: &mut SubscribeObject| { &mut m.source },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "ty",
- |m: &SubscribeObject| { &m.ty },
- |m: &mut SubscribeObject| { &mut m.ty },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "id",
- |m: &SubscribeObject| { &m.id },
- |m: &mut SubscribeObject| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor::<_>(
- "payload",
- SubscribeObject::has_payload,
- SubscribeObject::get_payload,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor::<_>(
- "error",
- SubscribeObject::has_error,
- SubscribeObject::get_error,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SubscribeObject>(
- "SubscribeObject",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static SubscribeObject {
- static instance: ::protobuf::rt::LazyV2<SubscribeObject> = ::protobuf::rt::LazyV2::INIT;
- instance.get(SubscribeObject::new)
- }
-}
-
-impl ::protobuf::Clear for SubscribeObject {
- fn clear(&mut self) {
- self.source.clear();
- self.ty = 0;
- self.id.clear();
- self.one_of_payload = ::std::option::Option::None;
- self.one_of_error = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for SubscribeObject {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for SubscribeObject {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\rsubject.proto\"\x9f\x01\n\x0fSubscribeObject\x12\x16\n\x06source\x18\
- \x01\x20\x01(\tR\x06source\x12\x0e\n\x02ty\x18\x02\x20\x01(\x05R\x02ty\
- \x12\x0e\n\x02id\x18\x03\x20\x01(\tR\x02id\x12\x1a\n\x07payload\x18\x04\
- \x20\x01(\x0cH\0R\x07payload\x12\x16\n\x05error\x18\x05\x20\x01(\x0cH\
- \x01R\x05errorB\x10\n\x0eone_of_payloadB\x0e\n\x0cone_of_errorb\x06proto\
- 3\
-";
-
-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()
- })
-}
diff --git a/frontend/rust-lib/flowy-error/src/protobuf/mod.rs b/frontend/rust-lib/flowy-error/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/frontend/rust-lib/flowy-error/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/frontend/rust-lib/flowy-error/src/protobuf/model/errors.rs b/frontend/rust-lib/flowy-error/src/protobuf/model/errors.rs
deleted file mode 100644
index 150e16c280..0000000000
--- a/frontend/rust-lib/flowy-error/src/protobuf/model/errors.rs
+++ /dev/null
@@ -1,235 +0,0 @@
-// 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 `errors.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 FlowyError {
- // message fields
- pub code: i32,
- pub msg: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a FlowyError {
- fn default() -> &'a FlowyError {
- <FlowyError as ::protobuf::Message>::default_instance()
- }
-}
-
-impl FlowyError {
- pub fn new() -> FlowyError {
- ::std::default::Default::default()
- }
-
- // int32 code = 1;
-
-
- pub fn get_code(&self) -> i32 {
- self.code
- }
- pub fn clear_code(&mut self) {
- self.code = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_code(&mut self, v: i32) {
- self.code = v;
- }
-
- // string msg = 2;
-
-
- pub fn get_msg(&self) -> &str {
- &self.msg
- }
- pub fn clear_msg(&mut self) {
- self.msg.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_msg(&mut self, v: ::std::string::String) {
- self.msg = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_msg(&mut self) -> &mut ::std::string::String {
- &mut self.msg
- }
-
- // Take field
- pub fn take_msg(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.msg, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for FlowyError {
- 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.code = tmp;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.msg)?;
- },
- _ => {
- ::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.msg.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.msg);
- }
- 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_int32(1, self.code)?;
- }
- if !self.msg.is_empty() {
- os.write_string(2, &self.msg)?;
- }
- 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() -> FlowyError {
- FlowyError::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::ProtobufTypeInt32>(
- "code",
- |m: &FlowyError| { &m.code },
- |m: &mut FlowyError| { &mut m.code },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "msg",
- |m: &FlowyError| { &m.msg },
- |m: &mut FlowyError| { &mut m.msg },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<FlowyError>(
- "FlowyError",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static FlowyError {
- static instance: ::protobuf::rt::LazyV2<FlowyError> = ::protobuf::rt::LazyV2::INIT;
- instance.get(FlowyError::new)
- }
-}
-
-impl ::protobuf::Clear for FlowyError {
- fn clear(&mut self) {
- self.code = 0;
- self.msg.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for FlowyError {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FlowyError {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0cerrors.proto\"2\n\nFlowyError\x12\x12\n\x04code\x18\x01\x20\x01(\
- \x05R\x04code\x12\x10\n\x03msg\x18\x02\x20\x01(\tR\x03msgb\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()
- })
-}
diff --git a/frontend/rust-lib/flowy-error/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-error/src/protobuf/model/mod.rs
deleted file mode 100644
index dcfc5a14fe..0000000000
--- a/frontend/rust-lib/flowy-error/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod errors;
-pub use errors::*;
diff --git a/frontend/rust-lib/flowy-folder/src/protobuf/mod.rs b/frontend/rust-lib/flowy-folder/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/frontend/rust-lib/flowy-folder/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/frontend/rust-lib/flowy-folder/src/protobuf/model/dart_notification.rs b/frontend/rust-lib/flowy-folder/src/protobuf/model/dart_notification.rs
deleted file mode 100644
index f57f71114b..0000000000
--- a/frontend/rust-lib/flowy-folder/src/protobuf/model/dart_notification.rs
+++ /dev/null
@@ -1,134 +0,0 @@
-// 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 `dart_notification.proto`
-
-/// Generated files are compatible only with the same version
-/// of protobuf runtime.
-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum FolderNotification {
- Unknown = 0,
- UserCreateWorkspace = 10,
- UserDeleteWorkspace = 11,
- WorkspaceUpdated = 12,
- WorkspaceListUpdated = 13,
- WorkspaceAppsChanged = 14,
- WorkspaceSetting = 15,
- AppUpdated = 21,
- AppViewsChanged = 24,
- ViewUpdated = 31,
- ViewDeleted = 32,
- ViewRestored = 33,
- UserUnauthorized = 100,
- TrashUpdated = 1000,
-}
-
-impl ::protobuf::ProtobufEnum for FolderNotification {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<FolderNotification> {
- match value {
- 0 => ::std::option::Option::Some(FolderNotification::Unknown),
- 10 => ::std::option::Option::Some(FolderNotification::UserCreateWorkspace),
- 11 => ::std::option::Option::Some(FolderNotification::UserDeleteWorkspace),
- 12 => ::std::option::Option::Some(FolderNotification::WorkspaceUpdated),
- 13 => ::std::option::Option::Some(FolderNotification::WorkspaceListUpdated),
- 14 => ::std::option::Option::Some(FolderNotification::WorkspaceAppsChanged),
- 15 => ::std::option::Option::Some(FolderNotification::WorkspaceSetting),
- 21 => ::std::option::Option::Some(FolderNotification::AppUpdated),
- 24 => ::std::option::Option::Some(FolderNotification::AppViewsChanged),
- 31 => ::std::option::Option::Some(FolderNotification::ViewUpdated),
- 32 => ::std::option::Option::Some(FolderNotification::ViewDeleted),
- 33 => ::std::option::Option::Some(FolderNotification::ViewRestored),
- 100 => ::std::option::Option::Some(FolderNotification::UserUnauthorized),
- 1000 => ::std::option::Option::Some(FolderNotification::TrashUpdated),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [FolderNotification] = &[
- FolderNotification::Unknown,
- FolderNotification::UserCreateWorkspace,
- FolderNotification::UserDeleteWorkspace,
- FolderNotification::WorkspaceUpdated,
- FolderNotification::WorkspaceListUpdated,
- FolderNotification::WorkspaceAppsChanged,
- FolderNotification::WorkspaceSetting,
- FolderNotification::AppUpdated,
- FolderNotification::AppViewsChanged,
- FolderNotification::ViewUpdated,
- FolderNotification::ViewDeleted,
- FolderNotification::ViewRestored,
- FolderNotification::UserUnauthorized,
- FolderNotification::TrashUpdated,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<FolderNotification>("FolderNotification", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for FolderNotification {
-}
-
-impl ::std::default::Default for FolderNotification {
- fn default() -> Self {
- FolderNotification::Unknown
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FolderNotification {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x17dart_notification.proto*\xb5\x02\n\x12FolderNotification\x12\x0b\n\
- \x07Unknown\x10\0\x12\x17\n\x13UserCreateWorkspace\x10\n\x12\x17\n\x13Us\
- erDeleteWorkspace\x10\x0b\x12\x14\n\x10WorkspaceUpdated\x10\x0c\x12\x18\
- \n\x14WorkspaceListUpdated\x10\r\x12\x18\n\x14WorkspaceAppsChanged\x10\
- \x0e\x12\x14\n\x10WorkspaceSetting\x10\x0f\x12\x0e\n\nAppUpdated\x10\x15\
- \x12\x13\n\x0fAppViewsChanged\x10\x18\x12\x0f\n\x0bViewUpdated\x10\x1f\
- \x12\x0f\n\x0bViewDeleted\x10\x20\x12\x10\n\x0cViewRestored\x10!\x12\x14\
- \n\x10UserUnauthorized\x10d\x12\x11\n\x0cTrashUpdated\x10\xe8\x07b\x06pr\
- oto3\
-";
-
-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()
- })
-}
diff --git a/frontend/rust-lib/flowy-folder/src/protobuf/model/event_map.rs b/frontend/rust-lib/flowy-folder/src/protobuf/model/event_map.rs
deleted file mode 100644
index 6cfa810ab9..0000000000
--- a/frontend/rust-lib/flowy-folder/src/protobuf/model/event_map.rs
+++ /dev/null
@@ -1,171 +0,0 @@
-// 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 `event_map.proto`
-
-/// Generated files are compatible only with the same version
-/// of protobuf runtime.
-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum FolderEvent {
- CreateWorkspace = 0,
- ReadCurWorkspace = 1,
- ReadWorkspaces = 2,
- DeleteWorkspace = 3,
- OpenWorkspace = 4,
- ReadWorkspaceApps = 5,
- CreateApp = 101,
- DeleteApp = 102,
- ReadApp = 103,
- UpdateApp = 104,
- CreateView = 201,
- ReadView = 202,
- UpdateView = 203,
- DeleteView = 204,
- DuplicateView = 205,
- CloseView = 206,
- ReadViewInfo = 207,
- CopyLink = 220,
- SetLatestView = 221,
- MoveFolderItem = 230,
- ReadTrash = 300,
- PutbackTrash = 301,
- DeleteTrash = 302,
- RestoreAllTrash = 303,
- DeleteAllTrash = 304,
-}
-
-impl ::protobuf::ProtobufEnum for FolderEvent {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<FolderEvent> {
- match value {
- 0 => ::std::option::Option::Some(FolderEvent::CreateWorkspace),
- 1 => ::std::option::Option::Some(FolderEvent::ReadCurWorkspace),
- 2 => ::std::option::Option::Some(FolderEvent::ReadWorkspaces),
- 3 => ::std::option::Option::Some(FolderEvent::DeleteWorkspace),
- 4 => ::std::option::Option::Some(FolderEvent::OpenWorkspace),
- 5 => ::std::option::Option::Some(FolderEvent::ReadWorkspaceApps),
- 101 => ::std::option::Option::Some(FolderEvent::CreateApp),
- 102 => ::std::option::Option::Some(FolderEvent::DeleteApp),
- 103 => ::std::option::Option::Some(FolderEvent::ReadApp),
- 104 => ::std::option::Option::Some(FolderEvent::UpdateApp),
- 201 => ::std::option::Option::Some(FolderEvent::CreateView),
- 202 => ::std::option::Option::Some(FolderEvent::ReadView),
- 203 => ::std::option::Option::Some(FolderEvent::UpdateView),
- 204 => ::std::option::Option::Some(FolderEvent::DeleteView),
- 205 => ::std::option::Option::Some(FolderEvent::DuplicateView),
- 206 => ::std::option::Option::Some(FolderEvent::CloseView),
- 207 => ::std::option::Option::Some(FolderEvent::ReadViewInfo),
- 220 => ::std::option::Option::Some(FolderEvent::CopyLink),
- 221 => ::std::option::Option::Some(FolderEvent::SetLatestView),
- 230 => ::std::option::Option::Some(FolderEvent::MoveFolderItem),
- 300 => ::std::option::Option::Some(FolderEvent::ReadTrash),
- 301 => ::std::option::Option::Some(FolderEvent::PutbackTrash),
- 302 => ::std::option::Option::Some(FolderEvent::DeleteTrash),
- 303 => ::std::option::Option::Some(FolderEvent::RestoreAllTrash),
- 304 => ::std::option::Option::Some(FolderEvent::DeleteAllTrash),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [FolderEvent] = &[
- FolderEvent::CreateWorkspace,
- FolderEvent::ReadCurWorkspace,
- FolderEvent::ReadWorkspaces,
- FolderEvent::DeleteWorkspace,
- FolderEvent::OpenWorkspace,
- FolderEvent::ReadWorkspaceApps,
- FolderEvent::CreateApp,
- FolderEvent::DeleteApp,
- FolderEvent::ReadApp,
- FolderEvent::UpdateApp,
- FolderEvent::CreateView,
- FolderEvent::ReadView,
- FolderEvent::UpdateView,
- FolderEvent::DeleteView,
- FolderEvent::DuplicateView,
- FolderEvent::CloseView,
- FolderEvent::ReadViewInfo,
- FolderEvent::CopyLink,
- FolderEvent::SetLatestView,
- FolderEvent::MoveFolderItem,
- FolderEvent::ReadTrash,
- FolderEvent::PutbackTrash,
- FolderEvent::DeleteTrash,
- FolderEvent::RestoreAllTrash,
- FolderEvent::DeleteAllTrash,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<FolderEvent>("FolderEvent", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for FolderEvent {
-}
-
-impl ::std::default::Default for FolderEvent {
- fn default() -> Self {
- FolderEvent::CreateWorkspace
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FolderEvent {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0fevent_map.proto*\xd6\x03\n\x0bFolderEvent\x12\x13\n\x0fCreateWorks\
- pace\x10\0\x12\x14\n\x10ReadCurWorkspace\x10\x01\x12\x12\n\x0eReadWorksp\
- aces\x10\x02\x12\x13\n\x0fDeleteWorkspace\x10\x03\x12\x11\n\rOpenWorkspa\
- ce\x10\x04\x12\x15\n\x11ReadWorkspaceApps\x10\x05\x12\r\n\tCreateApp\x10\
- e\x12\r\n\tDeleteApp\x10f\x12\x0b\n\x07ReadApp\x10g\x12\r\n\tUpdateApp\
- \x10h\x12\x0f\n\nCreateView\x10\xc9\x01\x12\r\n\x08ReadView\x10\xca\x01\
- \x12\x0f\n\nUpdateView\x10\xcb\x01\x12\x0f\n\nDeleteView\x10\xcc\x01\x12\
- \x12\n\rDuplicateView\x10\xcd\x01\x12\x0e\n\tCloseView\x10\xce\x01\x12\
- \x11\n\x0cReadViewInfo\x10\xcf\x01\x12\r\n\x08CopyLink\x10\xdc\x01\x12\
- \x12\n\rSetLatestView\x10\xdd\x01\x12\x13\n\x0eMoveFolderItem\x10\xe6\
- \x01\x12\x0e\n\tReadTrash\x10\xac\x02\x12\x11\n\x0cPutbackTrash\x10\xad\
- \x02\x12\x10\n\x0bDeleteTrash\x10\xae\x02\x12\x14\n\x0fRestoreAllTrash\
- \x10\xaf\x02\x12\x13\n\x0eDeleteAllTrash\x10\xb0\x02b\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()
- })
-}
diff --git a/frontend/rust-lib/flowy-folder/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-folder/src/protobuf/model/mod.rs
deleted file mode 100644
index 625ac089f8..0000000000
--- a/frontend/rust-lib/flowy-folder/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod dart_notification;
-pub use dart_notification::*;
-
-mod event_map;
-pub use event_map::*;
diff --git a/frontend/rust-lib/flowy-net/src/protobuf/mod.rs b/frontend/rust-lib/flowy-net/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/frontend/rust-lib/flowy-net/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/frontend/rust-lib/flowy-net/src/protobuf/model/event_map.rs b/frontend/rust-lib/flowy-net/src/protobuf/model/event_map.rs
deleted file mode 100644
index 5eb3ed93d9..0000000000
--- a/frontend/rust-lib/flowy-net/src/protobuf/model/event_map.rs
+++ /dev/null
@@ -1,88 +0,0 @@
-// 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 `event_map.proto`
-
-/// Generated files are compatible only with the same version
-/// of protobuf runtime.
-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum NetworkEvent {
- UpdateNetworkType = 0,
-}
-
-impl ::protobuf::ProtobufEnum for NetworkEvent {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<NetworkEvent> {
- match value {
- 0 => ::std::option::Option::Some(NetworkEvent::UpdateNetworkType),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [NetworkEvent] = &[
- NetworkEvent::UpdateNetworkType,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<NetworkEvent>("NetworkEvent", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for NetworkEvent {
-}
-
-impl ::std::default::Default for NetworkEvent {
- fn default() -> Self {
- NetworkEvent::UpdateNetworkType
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for NetworkEvent {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0fevent_map.proto*%\n\x0cNetworkEvent\x12\x15\n\x11UpdateNetworkType\
- \x10\0b\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()
- })
-}
diff --git a/frontend/rust-lib/flowy-net/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-net/src/protobuf/model/mod.rs
deleted file mode 100644
index dd4f933626..0000000000
--- a/frontend/rust-lib/flowy-net/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod network_state;
-pub use network_state::*;
-
-mod event_map;
-pub use event_map::*;
diff --git a/frontend/rust-lib/flowy-net/src/protobuf/model/network_state.rs b/frontend/rust-lib/flowy-net/src/protobuf/model/network_state.rs
deleted file mode 100644
index 26fa1259fa..0000000000
--- a/frontend/rust-lib/flowy-net/src/protobuf/model/network_state.rs
+++ /dev/null
@@ -1,247 +0,0 @@
-// 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 `network_state.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 NetworkState {
- // message fields
- pub ty: NetworkType,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a NetworkState {
- fn default() -> &'a NetworkState {
- <NetworkState as ::protobuf::Message>::default_instance()
- }
-}
-
-impl NetworkState {
- pub fn new() -> NetworkState {
- ::std::default::Default::default()
- }
-
- // .NetworkType ty = 1;
-
-
- pub fn get_ty(&self) -> NetworkType {
- self.ty
- }
- pub fn clear_ty(&mut self) {
- self.ty = NetworkType::UnknownNetworkType;
- }
-
- // Param is passed by value, moved
- pub fn set_ty(&mut self, v: NetworkType) {
- self.ty = v;
- }
-}
-
-impl ::protobuf::Message for NetworkState {
- 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_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 1, &mut self.unknown_fields)?
- },
- _ => {
- ::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.ty != NetworkType::UnknownNetworkType {
- my_size += ::protobuf::rt::enum_size(1, self.ty);
- }
- 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.ty != NetworkType::UnknownNetworkType {
- os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.ty))?;
- }
- 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() -> NetworkState {
- NetworkState::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::ProtobufTypeEnum<NetworkType>>(
- "ty",
- |m: &NetworkState| { &m.ty },
- |m: &mut NetworkState| { &mut m.ty },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<NetworkState>(
- "NetworkState",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static NetworkState {
- static instance: ::protobuf::rt::LazyV2<NetworkState> = ::protobuf::rt::LazyV2::INIT;
- instance.get(NetworkState::new)
- }
-}
-
-impl ::protobuf::Clear for NetworkState {
- fn clear(&mut self) {
- self.ty = NetworkType::UnknownNetworkType;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for NetworkState {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for NetworkState {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum NetworkType {
- UnknownNetworkType = 0,
- Wifi = 1,
- Cell = 2,
- Ethernet = 3,
-}
-
-impl ::protobuf::ProtobufEnum for NetworkType {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<NetworkType> {
- match value {
- 0 => ::std::option::Option::Some(NetworkType::UnknownNetworkType),
- 1 => ::std::option::Option::Some(NetworkType::Wifi),
- 2 => ::std::option::Option::Some(NetworkType::Cell),
- 3 => ::std::option::Option::Some(NetworkType::Ethernet),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [NetworkType] = &[
- NetworkType::UnknownNetworkType,
- NetworkType::Wifi,
- NetworkType::Cell,
- NetworkType::Ethernet,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<NetworkType>("NetworkType", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for NetworkType {
-}
-
-impl ::std::default::Default for NetworkType {
- fn default() -> Self {
- NetworkType::UnknownNetworkType
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for NetworkType {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x13network_state.proto\",\n\x0cNetworkState\x12\x1c\n\x02ty\x18\x01\
- \x20\x01(\x0e2\x0c.NetworkTypeR\x02ty*G\n\x0bNetworkType\x12\x16\n\x12Un\
- knownNetworkType\x10\0\x12\x08\n\x04Wifi\x10\x01\x12\x08\n\x04Cell\x10\
- \x02\x12\x0c\n\x08Ethernet\x10\x03b\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()
- })
-}
diff --git a/frontend/rust-lib/flowy-text-block/src/protobuf/mod.rs b/frontend/rust-lib/flowy-text-block/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/frontend/rust-lib/flowy-text-block/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/frontend/rust-lib/flowy-text-block/src/protobuf/model/entities.rs b/frontend/rust-lib/flowy-text-block/src/protobuf/model/entities.rs
deleted file mode 100644
index 3846f9c76f..0000000000
--- a/frontend/rust-lib/flowy-text-block/src/protobuf/model/entities.rs
+++ /dev/null
@@ -1,478 +0,0 @@
-// 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 `entities.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 ExportPayload {
- // message fields
- pub view_id: ::std::string::String,
- pub export_type: ExportType,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ExportPayload {
- fn default() -> &'a ExportPayload {
- <ExportPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ExportPayload {
- pub fn new() -> ExportPayload {
- ::std::default::Default::default()
- }
-
- // string view_id = 1;
-
-
- pub fn get_view_id(&self) -> &str {
- &self.view_id
- }
- pub fn clear_view_id(&mut self) {
- self.view_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_view_id(&mut self, v: ::std::string::String) {
- self.view_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_view_id(&mut self) -> &mut ::std::string::String {
- &mut self.view_id
- }
-
- // Take field
- pub fn take_view_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.view_id, ::std::string::String::new())
- }
-
- // .ExportType export_type = 2;
-
-
- pub fn get_export_type(&self) -> ExportType {
- self.export_type
- }
- pub fn clear_export_type(&mut self) {
- self.export_type = ExportType::Text;
- }
-
- // Param is passed by value, moved
- pub fn set_export_type(&mut self, v: ExportType) {
- self.export_type = v;
- }
-}
-
-impl ::protobuf::Message for ExportPayload {
- 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.view_id)?;
- },
- 2 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.export_type, 2, &mut self.unknown_fields)?
- },
- _ => {
- ::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.view_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.view_id);
- }
- if self.export_type != ExportType::Text {
- my_size += ::protobuf::rt::enum_size(2, self.export_type);
- }
- 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.view_id.is_empty() {
- os.write_string(1, &self.view_id)?;
- }
- if self.export_type != ExportType::Text {
- os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.export_type))?;
- }
- 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() -> ExportPayload {
- ExportPayload::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>(
- "view_id",
- |m: &ExportPayload| { &m.view_id },
- |m: &mut ExportPayload| { &mut m.view_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ExportType>>(
- "export_type",
- |m: &ExportPayload| { &m.export_type },
- |m: &mut ExportPayload| { &mut m.export_type },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ExportPayload>(
- "ExportPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ExportPayload {
- static instance: ::protobuf::rt::LazyV2<ExportPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ExportPayload::new)
- }
-}
-
-impl ::protobuf::Clear for ExportPayload {
- fn clear(&mut self) {
- self.view_id.clear();
- self.export_type = ExportType::Text;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ExportPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ExportPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ExportData {
- // message fields
- pub data: ::std::string::String,
- pub export_type: ExportType,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ExportData {
- fn default() -> &'a ExportData {
- <ExportData as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ExportData {
- pub fn new() -> ExportData {
- ::std::default::Default::default()
- }
-
- // string data = 1;
-
-
- pub fn get_data(&self) -> &str {
- &self.data
- }
- 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())
- }
-
- // .ExportType export_type = 2;
-
-
- pub fn get_export_type(&self) -> ExportType {
- self.export_type
- }
- pub fn clear_export_type(&mut self) {
- self.export_type = ExportType::Text;
- }
-
- // Param is passed by value, moved
- pub fn set_export_type(&mut self, v: ExportType) {
- self.export_type = v;
- }
-}
-
-impl ::protobuf::Message for ExportData {
- 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_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.export_type, 2, &mut self.unknown_fields)?
- },
- _ => {
- ::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.export_type != ExportType::Text {
- my_size += ::protobuf::rt::enum_size(2, self.export_type);
- }
- 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.export_type != ExportType::Text {
- os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.export_type))?;
- }
- 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() -> ExportData {
- ExportData::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>(
- "data",
- |m: &ExportData| { &m.data },
- |m: &mut ExportData| { &mut m.data },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ExportType>>(
- "export_type",
- |m: &ExportData| { &m.export_type },
- |m: &mut ExportData| { &mut m.export_type },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ExportData>(
- "ExportData",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ExportData {
- static instance: ::protobuf::rt::LazyV2<ExportData> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ExportData::new)
- }
-}
-
-impl ::protobuf::Clear for ExportData {
- fn clear(&mut self) {
- self.data.clear();
- self.export_type = ExportType::Text;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ExportData {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ExportData {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum ExportType {
- Text = 0,
- Markdown = 1,
- Link = 2,
-}
-
-impl ::protobuf::ProtobufEnum for ExportType {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<ExportType> {
- match value {
- 0 => ::std::option::Option::Some(ExportType::Text),
- 1 => ::std::option::Option::Some(ExportType::Markdown),
- 2 => ::std::option::Option::Some(ExportType::Link),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [ExportType] = &[
- ExportType::Text,
- ExportType::Markdown,
- ExportType::Link,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<ExportType>("ExportType", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for ExportType {
-}
-
-impl ::std::default::Default for ExportType {
- fn default() -> Self {
- ExportType::Text
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ExportType {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0eentities.proto\"V\n\rExportPayload\x12\x17\n\x07view_id\x18\x01\
- \x20\x01(\tR\x06viewId\x12,\n\x0bexport_type\x18\x02\x20\x01(\x0e2\x0b.E\
- xportTypeR\nexportType\"N\n\nExportData\x12\x12\n\x04data\x18\x01\x20\
- \x01(\tR\x04data\x12,\n\x0bexport_type\x18\x02\x20\x01(\x0e2\x0b.ExportT\
- ypeR\nexportType*.\n\nExportType\x12\x08\n\x04Text\x10\0\x12\x0c\n\x08Ma\
- rkdown\x10\x01\x12\x08\n\x04Link\x10\x02b\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()
- })
-}
diff --git a/frontend/rust-lib/flowy-text-block/src/protobuf/model/event_map.rs b/frontend/rust-lib/flowy-text-block/src/protobuf/model/event_map.rs
deleted file mode 100644
index f0356559c5..0000000000
--- a/frontend/rust-lib/flowy-text-block/src/protobuf/model/event_map.rs
+++ /dev/null
@@ -1,95 +0,0 @@
-// 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 `event_map.proto`
-
-/// Generated files are compatible only with the same version
-/// of protobuf runtime.
-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum TextBlockEvent {
- GetBlockData = 0,
- ApplyDelta = 1,
- ExportDocument = 2,
-}
-
-impl ::protobuf::ProtobufEnum for TextBlockEvent {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<TextBlockEvent> {
- match value {
- 0 => ::std::option::Option::Some(TextBlockEvent::GetBlockData),
- 1 => ::std::option::Option::Some(TextBlockEvent::ApplyDelta),
- 2 => ::std::option::Option::Some(TextBlockEvent::ExportDocument),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [TextBlockEvent] = &[
- TextBlockEvent::GetBlockData,
- TextBlockEvent::ApplyDelta,
- TextBlockEvent::ExportDocument,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<TextBlockEvent>("TextBlockEvent", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for TextBlockEvent {
-}
-
-impl ::std::default::Default for TextBlockEvent {
- fn default() -> Self {
- TextBlockEvent::GetBlockData
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for TextBlockEvent {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0fevent_map.proto*F\n\x0eTextBlockEvent\x12\x10\n\x0cGetBlockData\
- \x10\0\x12\x0e\n\nApplyDelta\x10\x01\x12\x12\n\x0eExportDocument\x10\x02\
- b\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()
- })
-}
diff --git a/frontend/rust-lib/flowy-text-block/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-text-block/src/protobuf/model/mod.rs
deleted file mode 100644
index a8012019d4..0000000000
--- a/frontend/rust-lib/flowy-text-block/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod entities;
-pub use entities::*;
-
-mod event_map;
-pub use event_map::*;
diff --git a/frontend/rust-lib/flowy-user/src/protobuf/mod.rs b/frontend/rust-lib/flowy-user/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/frontend/rust-lib/flowy-user/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/dart_notification.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/dart_notification.rs
deleted file mode 100644
index a340c4aa27..0000000000
--- a/frontend/rust-lib/flowy-user/src/protobuf/model/dart_notification.rs
+++ /dev/null
@@ -1,102 +0,0 @@
-// 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 `dart_notification.proto`
-
-/// Generated files are compatible only with the same version
-/// of protobuf runtime.
-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum UserNotification {
- Unknown = 0,
- UserAuthChanged = 1,
- UserProfileUpdated = 2,
- UserUnauthorized = 3,
- UserWsConnectStateChanged = 4,
-}
-
-impl ::protobuf::ProtobufEnum for UserNotification {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<UserNotification> {
- match value {
- 0 => ::std::option::Option::Some(UserNotification::Unknown),
- 1 => ::std::option::Option::Some(UserNotification::UserAuthChanged),
- 2 => ::std::option::Option::Some(UserNotification::UserProfileUpdated),
- 3 => ::std::option::Option::Some(UserNotification::UserUnauthorized),
- 4 => ::std::option::Option::Some(UserNotification::UserWsConnectStateChanged),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [UserNotification] = &[
- UserNotification::Unknown,
- UserNotification::UserAuthChanged,
- UserNotification::UserProfileUpdated,
- UserNotification::UserUnauthorized,
- UserNotification::UserWsConnectStateChanged,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<UserNotification>("UserNotification", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for UserNotification {
-}
-
-impl ::std::default::Default for UserNotification {
- fn default() -> Self {
- UserNotification::Unknown
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UserNotification {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x17dart_notification.proto*\x81\x01\n\x10UserNotification\x12\x0b\n\
- \x07Unknown\x10\0\x12\x13\n\x0fUserAuthChanged\x10\x01\x12\x16\n\x12User\
- ProfileUpdated\x10\x02\x12\x14\n\x10UserUnauthorized\x10\x03\x12\x1d\n\
- \x19UserWsConnectStateChanged\x10\x04b\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()
- })
-}
diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/event_map.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/event_map.rs
deleted file mode 100644
index b536f361a5..0000000000
--- a/frontend/rust-lib/flowy-user/src/protobuf/model/event_map.rs
+++ /dev/null
@@ -1,115 +0,0 @@
-// 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 `event_map.proto`
-
-/// Generated files are compatible only with the same version
-/// of protobuf runtime.
-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum UserEvent {
- InitUser = 0,
- SignIn = 1,
- SignUp = 2,
- SignOut = 3,
- UpdateUser = 4,
- GetUserProfile = 5,
- CheckUser = 6,
- SetAppearanceSetting = 7,
- GetAppearanceSetting = 8,
-}
-
-impl ::protobuf::ProtobufEnum for UserEvent {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<UserEvent> {
- match value {
- 0 => ::std::option::Option::Some(UserEvent::InitUser),
- 1 => ::std::option::Option::Some(UserEvent::SignIn),
- 2 => ::std::option::Option::Some(UserEvent::SignUp),
- 3 => ::std::option::Option::Some(UserEvent::SignOut),
- 4 => ::std::option::Option::Some(UserEvent::UpdateUser),
- 5 => ::std::option::Option::Some(UserEvent::GetUserProfile),
- 6 => ::std::option::Option::Some(UserEvent::CheckUser),
- 7 => ::std::option::Option::Some(UserEvent::SetAppearanceSetting),
- 8 => ::std::option::Option::Some(UserEvent::GetAppearanceSetting),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [UserEvent] = &[
- UserEvent::InitUser,
- UserEvent::SignIn,
- UserEvent::SignUp,
- UserEvent::SignOut,
- UserEvent::UpdateUser,
- UserEvent::GetUserProfile,
- UserEvent::CheckUser,
- UserEvent::SetAppearanceSetting,
- UserEvent::GetAppearanceSetting,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<UserEvent>("UserEvent", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for UserEvent {
-}
-
-impl ::std::default::Default for UserEvent {
- fn default() -> Self {
- UserEvent::InitUser
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UserEvent {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0fevent_map.proto*\xa5\x01\n\tUserEvent\x12\x0c\n\x08InitUser\x10\0\
- \x12\n\n\x06SignIn\x10\x01\x12\n\n\x06SignUp\x10\x02\x12\x0b\n\x07SignOu\
- t\x10\x03\x12\x0e\n\nUpdateUser\x10\x04\x12\x12\n\x0eGetUserProfile\x10\
- \x05\x12\r\n\tCheckUser\x10\x06\x12\x18\n\x14SetAppearanceSetting\x10\
- \x07\x12\x18\n\x14GetAppearanceSetting\x10\x08b\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()
- })
-}
diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rs
deleted file mode 100644
index 625ac089f8..0000000000
--- a/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod dart_notification;
-pub use dart_notification::*;
-
-mod event_map;
-pub use event_map::*;
diff --git a/shared-lib/flowy-error-code/src/assets/mod.rs b/shared-lib/flowy-error-code/src/assets/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/shared-lib/flowy-error-code/src/assets/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/shared-lib/flowy-error-code/src/assets/model/mod.rs b/shared-lib/flowy-error-code/src/assets/model/mod.rs
deleted file mode 100644
index 191b80e077..0000000000
--- a/shared-lib/flowy-error-code/src/assets/model/mod.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod code;
-pub use code::*;
diff --git a/shared-lib/flowy-error-code/src/assets/proto/code.proto b/shared-lib/flowy-error-code/src/assets/proto/code.proto
deleted file mode 100644
index ede9b65657..0000000000
--- a/shared-lib/flowy-error-code/src/assets/proto/code.proto
+++ /dev/null
@@ -1,48 +0,0 @@
-syntax = "proto3";
-enum ErrorCode {
- Internal = 0;
- UserUnauthorized = 2;
- RecordNotFound = 3;
- UserIdIsEmpty = 4;
- WorkspaceNameInvalid = 100;
- WorkspaceIdInvalid = 101;
- AppColorStyleInvalid = 102;
- WorkspaceDescTooLong = 103;
- WorkspaceNameTooLong = 104;
- AppIdInvalid = 110;
- AppNameInvalid = 111;
- ViewNameInvalid = 120;
- ViewThumbnailInvalid = 121;
- ViewIdInvalid = 122;
- ViewDescTooLong = 123;
- ViewDataInvalid = 124;
- ViewNameTooLong = 125;
- ConnectError = 200;
- EmailIsEmpty = 300;
- EmailFormatInvalid = 301;
- EmailAlreadyExists = 302;
- PasswordIsEmpty = 303;
- PasswordTooLong = 304;
- PasswordContainsForbidCharacters = 305;
- PasswordFormatInvalid = 306;
- PasswordNotMatch = 307;
- UserNameTooLong = 308;
- UserNameContainForbiddenCharacters = 309;
- UserNameIsEmpty = 310;
- UserIdInvalid = 311;
- UserNotExist = 312;
- TextTooLong = 400;
- GridIdIsEmpty = 410;
- BlockIdIsEmpty = 420;
- RowIdIsEmpty = 430;
- OptionIdIsEmpty = 431;
- FieldIdIsEmpty = 440;
- FieldDoesNotExist = 441;
- SelectOptionNameIsEmpty = 442;
- FieldNotExists = 443;
- FieldInvalidOperation = 444;
- TypeOptionDataIsEmpty = 450;
- InvalidDateTimeFormat = 500;
- UnexpectedEmptyString = 999;
- InvalidData = 1000;
-}
diff --git a/shared-lib/flowy-error-code/src/protobuf/mod.rs b/shared-lib/flowy-error-code/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/shared-lib/flowy-error-code/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/shared-lib/flowy-error-code/src/protobuf/model/code.rs b/shared-lib/flowy-error-code/src/protobuf/model/code.rs
deleted file mode 100644
index 5a3d2628c9..0000000000
--- a/shared-lib/flowy-error-code/src/protobuf/model/code.rs
+++ /dev/null
@@ -1,244 +0,0 @@
-// 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 `code.proto`
-
-/// Generated files are compatible only with the same version
-/// of protobuf runtime.
-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum ErrorCode {
- Internal = 0,
- UserUnauthorized = 2,
- RecordNotFound = 3,
- UserIdIsEmpty = 4,
- WorkspaceNameInvalid = 100,
- WorkspaceIdInvalid = 101,
- AppColorStyleInvalid = 102,
- WorkspaceDescTooLong = 103,
- WorkspaceNameTooLong = 104,
- AppIdInvalid = 110,
- AppNameInvalid = 111,
- ViewNameInvalid = 120,
- ViewThumbnailInvalid = 121,
- ViewIdInvalid = 122,
- ViewDescTooLong = 123,
- ViewDataInvalid = 124,
- ViewNameTooLong = 125,
- ConnectError = 200,
- EmailIsEmpty = 300,
- EmailFormatInvalid = 301,
- EmailAlreadyExists = 302,
- PasswordIsEmpty = 303,
- PasswordTooLong = 304,
- PasswordContainsForbidCharacters = 305,
- PasswordFormatInvalid = 306,
- PasswordNotMatch = 307,
- UserNameTooLong = 308,
- UserNameContainForbiddenCharacters = 309,
- UserNameIsEmpty = 310,
- UserIdInvalid = 311,
- UserNotExist = 312,
- TextTooLong = 400,
- GridIdIsEmpty = 410,
- BlockIdIsEmpty = 420,
- RowIdIsEmpty = 430,
- OptionIdIsEmpty = 431,
- FieldIdIsEmpty = 440,
- FieldDoesNotExist = 441,
- SelectOptionNameIsEmpty = 442,
- FieldNotExists = 443,
- FieldInvalidOperation = 444,
- TypeOptionDataIsEmpty = 450,
- InvalidDateTimeFormat = 500,
- UnexpectedEmptyString = 999,
- InvalidData = 1000,
-}
-
-impl ::protobuf::ProtobufEnum for ErrorCode {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<ErrorCode> {
- match value {
- 0 => ::std::option::Option::Some(ErrorCode::Internal),
- 2 => ::std::option::Option::Some(ErrorCode::UserUnauthorized),
- 3 => ::std::option::Option::Some(ErrorCode::RecordNotFound),
- 4 => ::std::option::Option::Some(ErrorCode::UserIdIsEmpty),
- 100 => ::std::option::Option::Some(ErrorCode::WorkspaceNameInvalid),
- 101 => ::std::option::Option::Some(ErrorCode::WorkspaceIdInvalid),
- 102 => ::std::option::Option::Some(ErrorCode::AppColorStyleInvalid),
- 103 => ::std::option::Option::Some(ErrorCode::WorkspaceDescTooLong),
- 104 => ::std::option::Option::Some(ErrorCode::WorkspaceNameTooLong),
- 110 => ::std::option::Option::Some(ErrorCode::AppIdInvalid),
- 111 => ::std::option::Option::Some(ErrorCode::AppNameInvalid),
- 120 => ::std::option::Option::Some(ErrorCode::ViewNameInvalid),
- 121 => ::std::option::Option::Some(ErrorCode::ViewThumbnailInvalid),
- 122 => ::std::option::Option::Some(ErrorCode::ViewIdInvalid),
- 123 => ::std::option::Option::Some(ErrorCode::ViewDescTooLong),
- 124 => ::std::option::Option::Some(ErrorCode::ViewDataInvalid),
- 125 => ::std::option::Option::Some(ErrorCode::ViewNameTooLong),
- 200 => ::std::option::Option::Some(ErrorCode::ConnectError),
- 300 => ::std::option::Option::Some(ErrorCode::EmailIsEmpty),
- 301 => ::std::option::Option::Some(ErrorCode::EmailFormatInvalid),
- 302 => ::std::option::Option::Some(ErrorCode::EmailAlreadyExists),
- 303 => ::std::option::Option::Some(ErrorCode::PasswordIsEmpty),
- 304 => ::std::option::Option::Some(ErrorCode::PasswordTooLong),
- 305 => ::std::option::Option::Some(ErrorCode::PasswordContainsForbidCharacters),
- 306 => ::std::option::Option::Some(ErrorCode::PasswordFormatInvalid),
- 307 => ::std::option::Option::Some(ErrorCode::PasswordNotMatch),
- 308 => ::std::option::Option::Some(ErrorCode::UserNameTooLong),
- 309 => ::std::option::Option::Some(ErrorCode::UserNameContainForbiddenCharacters),
- 310 => ::std::option::Option::Some(ErrorCode::UserNameIsEmpty),
- 311 => ::std::option::Option::Some(ErrorCode::UserIdInvalid),
- 312 => ::std::option::Option::Some(ErrorCode::UserNotExist),
- 400 => ::std::option::Option::Some(ErrorCode::TextTooLong),
- 410 => ::std::option::Option::Some(ErrorCode::GridIdIsEmpty),
- 420 => ::std::option::Option::Some(ErrorCode::BlockIdIsEmpty),
- 430 => ::std::option::Option::Some(ErrorCode::RowIdIsEmpty),
- 431 => ::std::option::Option::Some(ErrorCode::OptionIdIsEmpty),
- 440 => ::std::option::Option::Some(ErrorCode::FieldIdIsEmpty),
- 441 => ::std::option::Option::Some(ErrorCode::FieldDoesNotExist),
- 442 => ::std::option::Option::Some(ErrorCode::SelectOptionNameIsEmpty),
- 443 => ::std::option::Option::Some(ErrorCode::FieldNotExists),
- 444 => ::std::option::Option::Some(ErrorCode::FieldInvalidOperation),
- 450 => ::std::option::Option::Some(ErrorCode::TypeOptionDataIsEmpty),
- 500 => ::std::option::Option::Some(ErrorCode::InvalidDateTimeFormat),
- 999 => ::std::option::Option::Some(ErrorCode::UnexpectedEmptyString),
- 1000 => ::std::option::Option::Some(ErrorCode::InvalidData),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [ErrorCode] = &[
- ErrorCode::Internal,
- ErrorCode::UserUnauthorized,
- ErrorCode::RecordNotFound,
- ErrorCode::UserIdIsEmpty,
- ErrorCode::WorkspaceNameInvalid,
- ErrorCode::WorkspaceIdInvalid,
- ErrorCode::AppColorStyleInvalid,
- ErrorCode::WorkspaceDescTooLong,
- ErrorCode::WorkspaceNameTooLong,
- ErrorCode::AppIdInvalid,
- ErrorCode::AppNameInvalid,
- ErrorCode::ViewNameInvalid,
- ErrorCode::ViewThumbnailInvalid,
- ErrorCode::ViewIdInvalid,
- ErrorCode::ViewDescTooLong,
- ErrorCode::ViewDataInvalid,
- ErrorCode::ViewNameTooLong,
- ErrorCode::ConnectError,
- ErrorCode::EmailIsEmpty,
- ErrorCode::EmailFormatInvalid,
- ErrorCode::EmailAlreadyExists,
- ErrorCode::PasswordIsEmpty,
- ErrorCode::PasswordTooLong,
- ErrorCode::PasswordContainsForbidCharacters,
- ErrorCode::PasswordFormatInvalid,
- ErrorCode::PasswordNotMatch,
- ErrorCode::UserNameTooLong,
- ErrorCode::UserNameContainForbiddenCharacters,
- ErrorCode::UserNameIsEmpty,
- ErrorCode::UserIdInvalid,
- ErrorCode::UserNotExist,
- ErrorCode::TextTooLong,
- ErrorCode::GridIdIsEmpty,
- ErrorCode::BlockIdIsEmpty,
- ErrorCode::RowIdIsEmpty,
- ErrorCode::OptionIdIsEmpty,
- ErrorCode::FieldIdIsEmpty,
- ErrorCode::FieldDoesNotExist,
- ErrorCode::SelectOptionNameIsEmpty,
- ErrorCode::FieldNotExists,
- ErrorCode::FieldInvalidOperation,
- ErrorCode::TypeOptionDataIsEmpty,
- ErrorCode::InvalidDateTimeFormat,
- ErrorCode::UnexpectedEmptyString,
- ErrorCode::InvalidData,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<ErrorCode>("ErrorCode", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for ErrorCode {
-}
-
-impl ::std::default::Default for ErrorCode {
- fn default() -> Self {
- ErrorCode::Internal
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ErrorCode {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\ncode.proto*\x9d\x08\n\tErrorCode\x12\x0c\n\x08Internal\x10\0\x12\x14\
- \n\x10UserUnauthorized\x10\x02\x12\x12\n\x0eRecordNotFound\x10\x03\x12\
- \x11\n\rUserIdIsEmpty\x10\x04\x12\x18\n\x14WorkspaceNameInvalid\x10d\x12\
- \x16\n\x12WorkspaceIdInvalid\x10e\x12\x18\n\x14AppColorStyleInvalid\x10f\
- \x12\x18\n\x14WorkspaceDescTooLong\x10g\x12\x18\n\x14WorkspaceNameTooLon\
- g\x10h\x12\x10\n\x0cAppIdInvalid\x10n\x12\x12\n\x0eAppNameInvalid\x10o\
- \x12\x13\n\x0fViewNameInvalid\x10x\x12\x18\n\x14ViewThumbnailInvalid\x10\
- y\x12\x11\n\rViewIdInvalid\x10z\x12\x13\n\x0fViewDescTooLong\x10{\x12\
- \x13\n\x0fViewDataInvalid\x10|\x12\x13\n\x0fViewNameTooLong\x10}\x12\x11\
- \n\x0cConnectError\x10\xc8\x01\x12\x11\n\x0cEmailIsEmpty\x10\xac\x02\x12\
- \x17\n\x12EmailFormatInvalid\x10\xad\x02\x12\x17\n\x12EmailAlreadyExists\
- \x10\xae\x02\x12\x14\n\x0fPasswordIsEmpty\x10\xaf\x02\x12\x14\n\x0fPassw\
- ordTooLong\x10\xb0\x02\x12%\n\x20PasswordContainsForbidCharacters\x10\
- \xb1\x02\x12\x1a\n\x15PasswordFormatInvalid\x10\xb2\x02\x12\x15\n\x10Pas\
- swordNotMatch\x10\xb3\x02\x12\x14\n\x0fUserNameTooLong\x10\xb4\x02\x12'\
- \n\"UserNameContainForbiddenCharacters\x10\xb5\x02\x12\x14\n\x0fUserName\
- IsEmpty\x10\xb6\x02\x12\x12\n\rUserIdInvalid\x10\xb7\x02\x12\x11\n\x0cUs\
- erNotExist\x10\xb8\x02\x12\x10\n\x0bTextTooLong\x10\x90\x03\x12\x12\n\rG\
- ridIdIsEmpty\x10\x9a\x03\x12\x13\n\x0eBlockIdIsEmpty\x10\xa4\x03\x12\x11\
- \n\x0cRowIdIsEmpty\x10\xae\x03\x12\x14\n\x0fOptionIdIsEmpty\x10\xaf\x03\
- \x12\x13\n\x0eFieldIdIsEmpty\x10\xb8\x03\x12\x16\n\x11FieldDoesNotExist\
- \x10\xb9\x03\x12\x1c\n\x17SelectOptionNameIsEmpty\x10\xba\x03\x12\x13\n\
- \x0eFieldNotExists\x10\xbb\x03\x12\x1a\n\x15FieldInvalidOperation\x10\
- \xbc\x03\x12\x1a\n\x15TypeOptionDataIsEmpty\x10\xc2\x03\x12\x1a\n\x15Inv\
- alidDateTimeFormat\x10\xf4\x03\x12\x1a\n\x15UnexpectedEmptyString\x10\
- \xe7\x07\x12\x10\n\x0bInvalidData\x10\xe8\x07b\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()
- })
-}
diff --git a/shared-lib/flowy-error-code/src/protobuf/model/mod.rs b/shared-lib/flowy-error-code/src/protobuf/model/mod.rs
deleted file mode 100644
index 191b80e077..0000000000
--- a/shared-lib/flowy-error-code/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod code;
-pub use code::*;
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/mod.rs b/shared-lib/flowy-folder-data-model/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/shared-lib/flowy-folder-data-model/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/app.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/app.rs
deleted file mode 100644
index 7848aabd9f..0000000000
--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/app.rs
+++ /dev/null
@@ -1,2535 +0,0 @@
-// 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 `app.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 App {
- // message fields
- pub id: ::std::string::String,
- pub workspace_id: ::std::string::String,
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- pub belongings: ::protobuf::SingularPtrField<super::view::RepeatedView>,
- pub version: i64,
- pub modified_time: i64,
- pub create_time: i64,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a App {
- fn default() -> &'a App {
- <App as ::protobuf::Message>::default_instance()
- }
-}
-
-impl App {
- pub fn new() -> App {
- ::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())
- }
-
- // string workspace_id = 2;
-
-
- pub fn get_workspace_id(&self) -> &str {
- &self.workspace_id
- }
- pub fn clear_workspace_id(&mut self) {
- self.workspace_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_workspace_id(&mut self, v: ::std::string::String) {
- self.workspace_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String {
- &mut self.workspace_id
- }
-
- // Take field
- pub fn take_workspace_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.workspace_id, ::std::string::String::new())
- }
-
- // string name = 3;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 4;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-
- // .RepeatedView belongings = 5;
-
-
- pub fn get_belongings(&self) -> &super::view::RepeatedView {
- self.belongings.as_ref().unwrap_or_else(|| <super::view::RepeatedView as ::protobuf::Message>::default_instance())
- }
- pub fn clear_belongings(&mut self) {
- self.belongings.clear();
- }
-
- pub fn has_belongings(&self) -> bool {
- self.belongings.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_belongings(&mut self, v: super::view::RepeatedView) {
- self.belongings = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_belongings(&mut self) -> &mut super::view::RepeatedView {
- if self.belongings.is_none() {
- self.belongings.set_default();
- }
- self.belongings.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_belongings(&mut self) -> super::view::RepeatedView {
- self.belongings.take().unwrap_or_else(|| super::view::RepeatedView::new())
- }
-
- // int64 version = 6;
-
-
- pub fn get_version(&self) -> i64 {
- self.version
- }
- pub fn clear_version(&mut self) {
- self.version = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_version(&mut self, v: i64) {
- self.version = v;
- }
-
- // int64 modified_time = 7;
-
-
- pub fn get_modified_time(&self) -> i64 {
- self.modified_time
- }
- pub fn clear_modified_time(&mut self) {
- self.modified_time = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_modified_time(&mut self, v: i64) {
- self.modified_time = v;
- }
-
- // int64 create_time = 8;
-
-
- pub fn get_create_time(&self) -> i64 {
- self.create_time
- }
- pub fn clear_create_time(&mut self) {
- self.create_time = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_create_time(&mut self, v: i64) {
- self.create_time = v;
- }
-}
-
-impl ::protobuf::Message for App {
- fn is_initialized(&self) -> bool {
- for v in &self.belongings {
- 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_proto3_string_into(wire_type, is, &mut self.workspace_id)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- 5 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.belongings)?;
- },
- 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.version = tmp;
- },
- 7 => {
- 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.modified_time = tmp;
- },
- 8 => {
- 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.create_time = 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.id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.id);
- }
- if !self.workspace_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.workspace_id);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.desc);
- }
- if let Some(ref v) = self.belongings.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if self.version != 0 {
- my_size += ::protobuf::rt::value_size(6, self.version, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.modified_time != 0 {
- my_size += ::protobuf::rt::value_size(7, self.modified_time, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.create_time != 0 {
- my_size += ::protobuf::rt::value_size(8, self.create_time, ::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.id.is_empty() {
- os.write_string(1, &self.id)?;
- }
- if !self.workspace_id.is_empty() {
- os.write_string(2, &self.workspace_id)?;
- }
- if !self.name.is_empty() {
- os.write_string(3, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(4, &self.desc)?;
- }
- if let Some(ref v) = self.belongings.as_ref() {
- os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- if self.version != 0 {
- os.write_int64(6, self.version)?;
- }
- if self.modified_time != 0 {
- os.write_int64(7, self.modified_time)?;
- }
- if self.create_time != 0 {
- os.write_int64(8, self.create_time)?;
- }
- 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() -> App {
- App::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: &App| { &m.id },
- |m: &mut App| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "workspace_id",
- |m: &App| { &m.workspace_id },
- |m: &mut App| { &mut m.workspace_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &App| { &m.name },
- |m: &mut App| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &App| { &m.desc },
- |m: &mut App| { &mut m.desc },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::view::RepeatedView>>(
- "belongings",
- |m: &App| { &m.belongings },
- |m: &mut App| { &mut m.belongings },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "version",
- |m: &App| { &m.version },
- |m: &mut App| { &mut m.version },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "modified_time",
- |m: &App| { &m.modified_time },
- |m: &mut App| { &mut m.modified_time },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "create_time",
- |m: &App| { &m.create_time },
- |m: &mut App| { &mut m.create_time },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<App>(
- "App",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static App {
- static instance: ::protobuf::rt::LazyV2<App> = ::protobuf::rt::LazyV2::INIT;
- instance.get(App::new)
- }
-}
-
-impl ::protobuf::Clear for App {
- fn clear(&mut self) {
- self.id.clear();
- self.workspace_id.clear();
- self.name.clear();
- self.desc.clear();
- self.belongings.clear();
- self.version = 0;
- self.modified_time = 0;
- self.create_time = 0;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for App {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for App {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedApp {
- // message fields
- pub items: ::protobuf::RepeatedField<App>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedApp {
- fn default() -> &'a RepeatedApp {
- <RepeatedApp as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedApp {
- pub fn new() -> RepeatedApp {
- ::std::default::Default::default()
- }
-
- // repeated .App items = 1;
-
-
- pub fn get_items(&self) -> &[App] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<App>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<App> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<App> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedApp {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- _ => {
- ::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.items {
- 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.items {
- 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) -> &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() -> RepeatedApp {
- RepeatedApp::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<App>>(
- "items",
- |m: &RepeatedApp| { &m.items },
- |m: &mut RepeatedApp| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedApp>(
- "RepeatedApp",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedApp {
- static instance: ::protobuf::rt::LazyV2<RepeatedApp> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedApp::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedApp {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedApp {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedApp {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct CreateAppPayload {
- // message fields
- pub workspace_id: ::std::string::String,
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- pub color_style: ::protobuf::SingularPtrField<ColorStyle>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a CreateAppPayload {
- fn default() -> &'a CreateAppPayload {
- <CreateAppPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl CreateAppPayload {
- pub fn new() -> CreateAppPayload {
- ::std::default::Default::default()
- }
-
- // string workspace_id = 1;
-
-
- pub fn get_workspace_id(&self) -> &str {
- &self.workspace_id
- }
- pub fn clear_workspace_id(&mut self) {
- self.workspace_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_workspace_id(&mut self, v: ::std::string::String) {
- self.workspace_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String {
- &mut self.workspace_id
- }
-
- // Take field
- pub fn take_workspace_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.workspace_id, ::std::string::String::new())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-
- // .ColorStyle color_style = 4;
-
-
- pub fn get_color_style(&self) -> &ColorStyle {
- self.color_style.as_ref().unwrap_or_else(|| <ColorStyle as ::protobuf::Message>::default_instance())
- }
- pub fn clear_color_style(&mut self) {
- self.color_style.clear();
- }
-
- pub fn has_color_style(&self) -> bool {
- self.color_style.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_color_style(&mut self, v: ColorStyle) {
- self.color_style = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_color_style(&mut self) -> &mut ColorStyle {
- if self.color_style.is_none() {
- self.color_style.set_default();
- }
- self.color_style.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_color_style(&mut self) -> ColorStyle {
- self.color_style.take().unwrap_or_else(|| ColorStyle::new())
- }
-}
-
-impl ::protobuf::Message for CreateAppPayload {
- fn is_initialized(&self) -> bool {
- for v in &self.color_style {
- 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.workspace_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.color_style)?;
- },
- _ => {
- ::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.workspace_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.workspace_id);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.desc);
- }
- if let Some(ref v) = self.color_style.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.workspace_id.is_empty() {
- os.write_string(1, &self.workspace_id)?;
- }
- if !self.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(3, &self.desc)?;
- }
- if let Some(ref v) = self.color_style.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)?;
- }
- 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() -> CreateAppPayload {
- CreateAppPayload::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>(
- "workspace_id",
- |m: &CreateAppPayload| { &m.workspace_id },
- |m: &mut CreateAppPayload| { &mut m.workspace_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &CreateAppPayload| { &m.name },
- |m: &mut CreateAppPayload| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &CreateAppPayload| { &m.desc },
- |m: &mut CreateAppPayload| { &mut m.desc },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ColorStyle>>(
- "color_style",
- |m: &CreateAppPayload| { &m.color_style },
- |m: &mut CreateAppPayload| { &mut m.color_style },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateAppPayload>(
- "CreateAppPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static CreateAppPayload {
- static instance: ::protobuf::rt::LazyV2<CreateAppPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(CreateAppPayload::new)
- }
-}
-
-impl ::protobuf::Clear for CreateAppPayload {
- fn clear(&mut self) {
- self.workspace_id.clear();
- self.name.clear();
- self.desc.clear();
- self.color_style.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for CreateAppPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for CreateAppPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ColorStyle {
- // message fields
- pub theme_color: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ColorStyle {
- fn default() -> &'a ColorStyle {
- <ColorStyle as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ColorStyle {
- pub fn new() -> ColorStyle {
- ::std::default::Default::default()
- }
-
- // string theme_color = 1;
-
-
- pub fn get_theme_color(&self) -> &str {
- &self.theme_color
- }
- pub fn clear_theme_color(&mut self) {
- self.theme_color.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_theme_color(&mut self, v: ::std::string::String) {
- self.theme_color = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_theme_color(&mut self) -> &mut ::std::string::String {
- &mut self.theme_color
- }
-
- // Take field
- pub fn take_theme_color(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.theme_color, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for ColorStyle {
- 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.theme_color)?;
- },
- _ => {
- ::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.theme_color.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.theme_color);
- }
- 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.theme_color.is_empty() {
- os.write_string(1, &self.theme_color)?;
- }
- 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() -> ColorStyle {
- ColorStyle::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>(
- "theme_color",
- |m: &ColorStyle| { &m.theme_color },
- |m: &mut ColorStyle| { &mut m.theme_color },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ColorStyle>(
- "ColorStyle",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ColorStyle {
- static instance: ::protobuf::rt::LazyV2<ColorStyle> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ColorStyle::new)
- }
-}
-
-impl ::protobuf::Clear for ColorStyle {
- fn clear(&mut self) {
- self.theme_color.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ColorStyle {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ColorStyle {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct CreateAppParams {
- // message fields
- pub workspace_id: ::std::string::String,
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- pub color_style: ::protobuf::SingularPtrField<ColorStyle>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a CreateAppParams {
- fn default() -> &'a CreateAppParams {
- <CreateAppParams as ::protobuf::Message>::default_instance()
- }
-}
-
-impl CreateAppParams {
- pub fn new() -> CreateAppParams {
- ::std::default::Default::default()
- }
-
- // string workspace_id = 1;
-
-
- pub fn get_workspace_id(&self) -> &str {
- &self.workspace_id
- }
- pub fn clear_workspace_id(&mut self) {
- self.workspace_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_workspace_id(&mut self, v: ::std::string::String) {
- self.workspace_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String {
- &mut self.workspace_id
- }
-
- // Take field
- pub fn take_workspace_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.workspace_id, ::std::string::String::new())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-
- // .ColorStyle color_style = 4;
-
-
- pub fn get_color_style(&self) -> &ColorStyle {
- self.color_style.as_ref().unwrap_or_else(|| <ColorStyle as ::protobuf::Message>::default_instance())
- }
- pub fn clear_color_style(&mut self) {
- self.color_style.clear();
- }
-
- pub fn has_color_style(&self) -> bool {
- self.color_style.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_color_style(&mut self, v: ColorStyle) {
- self.color_style = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_color_style(&mut self) -> &mut ColorStyle {
- if self.color_style.is_none() {
- self.color_style.set_default();
- }
- self.color_style.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_color_style(&mut self) -> ColorStyle {
- self.color_style.take().unwrap_or_else(|| ColorStyle::new())
- }
-}
-
-impl ::protobuf::Message for CreateAppParams {
- fn is_initialized(&self) -> bool {
- for v in &self.color_style {
- 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.workspace_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.color_style)?;
- },
- _ => {
- ::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.workspace_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.workspace_id);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.desc);
- }
- if let Some(ref v) = self.color_style.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.workspace_id.is_empty() {
- os.write_string(1, &self.workspace_id)?;
- }
- if !self.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(3, &self.desc)?;
- }
- if let Some(ref v) = self.color_style.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)?;
- }
- 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() -> CreateAppParams {
- CreateAppParams::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>(
- "workspace_id",
- |m: &CreateAppParams| { &m.workspace_id },
- |m: &mut CreateAppParams| { &mut m.workspace_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &CreateAppParams| { &m.name },
- |m: &mut CreateAppParams| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &CreateAppParams| { &m.desc },
- |m: &mut CreateAppParams| { &mut m.desc },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ColorStyle>>(
- "color_style",
- |m: &CreateAppParams| { &m.color_style },
- |m: &mut CreateAppParams| { &mut m.color_style },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateAppParams>(
- "CreateAppParams",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static CreateAppParams {
- static instance: ::protobuf::rt::LazyV2<CreateAppParams> = ::protobuf::rt::LazyV2::INIT;
- instance.get(CreateAppParams::new)
- }
-}
-
-impl ::protobuf::Clear for CreateAppParams {
- fn clear(&mut self) {
- self.workspace_id.clear();
- self.name.clear();
- self.desc.clear();
- self.color_style.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for CreateAppParams {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for CreateAppParams {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct AppId {
- // 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 AppId {
- fn default() -> &'a AppId {
- <AppId as ::protobuf::Message>::default_instance()
- }
-}
-
-impl AppId {
- pub fn new() -> AppId {
- ::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 AppId {
- 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() -> AppId {
- AppId::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: &AppId| { &m.value },
- |m: &mut AppId| { &mut m.value },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<AppId>(
- "AppId",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static AppId {
- static instance: ::protobuf::rt::LazyV2<AppId> = ::protobuf::rt::LazyV2::INIT;
- instance.get(AppId::new)
- }
-}
-
-impl ::protobuf::Clear for AppId {
- fn clear(&mut self) {
- self.value.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for AppId {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for AppId {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UpdateAppPayload {
- // message fields
- pub app_id: ::std::string::String,
- // message oneof groups
- pub one_of_name: ::std::option::Option<UpdateAppPayload_oneof_one_of_name>,
- pub one_of_desc: ::std::option::Option<UpdateAppPayload_oneof_one_of_desc>,
- pub one_of_color_style: ::std::option::Option<UpdateAppPayload_oneof_one_of_color_style>,
- pub one_of_is_trash: ::std::option::Option<UpdateAppPayload_oneof_one_of_is_trash>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UpdateAppPayload {
- fn default() -> &'a UpdateAppPayload {
- <UpdateAppPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateAppPayload_oneof_one_of_name {
- name(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateAppPayload_oneof_one_of_desc {
- desc(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateAppPayload_oneof_one_of_color_style {
- color_style(ColorStyle),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateAppPayload_oneof_one_of_is_trash {
- is_trash(bool),
-}
-
-impl UpdateAppPayload {
- pub fn new() -> UpdateAppPayload {
- ::std::default::Default::default()
- }
-
- // string app_id = 1;
-
-
- pub fn get_app_id(&self) -> &str {
- &self.app_id
- }
- pub fn clear_app_id(&mut self) {
- self.app_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_app_id(&mut self, v: ::std::string::String) {
- self.app_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_app_id(&mut self) -> &mut ::std::string::String {
- &mut self.app_id
- }
-
- // Take field
- pub fn take_app_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.app_id, ::std::string::String::new())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_name(&mut self) {
- self.one_of_name = ::std::option::Option::None;
- }
-
- pub fn has_name(&self) -> bool {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.one_of_name = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(_)) = self.one_of_name {
- } else {
- self.one_of_name = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(::std::string::String::new()));
- }
- match self.one_of_name {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- if self.has_name() {
- match self.one_of_name.take() {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_desc(&mut self) {
- self.one_of_desc = ::std::option::Option::None;
- }
-
- pub fn has_desc(&self) -> bool {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.one_of_desc = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(_)) = self.one_of_desc {
- } else {
- self.one_of_desc = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(::std::string::String::new()));
- }
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- if self.has_desc() {
- match self.one_of_desc.take() {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // .ColorStyle color_style = 4;
-
-
- pub fn get_color_style(&self) -> &ColorStyle {
- match self.one_of_color_style {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(ref v)) => v,
- _ => <ColorStyle as ::protobuf::Message>::default_instance(),
- }
- }
- pub fn clear_color_style(&mut self) {
- self.one_of_color_style = ::std::option::Option::None;
- }
-
- pub fn has_color_style(&self) -> bool {
- match self.one_of_color_style {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_color_style(&mut self, v: ColorStyle) {
- self.one_of_color_style = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_color_style(&mut self) -> &mut ColorStyle {
- if let ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(_)) = self.one_of_color_style {
- } else {
- self.one_of_color_style = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(ColorStyle::new()));
- }
- match self.one_of_color_style {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_color_style(&mut self) -> ColorStyle {
- if self.has_color_style() {
- match self.one_of_color_style.take() {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(v)) => v,
- _ => panic!(),
- }
- } else {
- ColorStyle::new()
- }
- }
-
- // bool is_trash = 5;
-
-
- pub fn get_is_trash(&self) -> bool {
- match self.one_of_is_trash {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_is_trash::is_trash(v)) => v,
- _ => false,
- }
- }
- pub fn clear_is_trash(&mut self) {
- self.one_of_is_trash = ::std::option::Option::None;
- }
-
- pub fn has_is_trash(&self) -> bool {
- match self.one_of_is_trash {
- ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_is_trash::is_trash(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_is_trash(&mut self, v: bool) {
- self.one_of_is_trash = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_is_trash::is_trash(v))
- }
-}
-
-impl ::protobuf::Message for UpdateAppPayload {
- fn is_initialized(&self) -> bool {
- if let Some(UpdateAppPayload_oneof_one_of_color_style::color_style(ref v)) = self.one_of_color_style {
- 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.app_id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_name = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(is.read_string()?));
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_desc = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(is.read_string()?));
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_color_style = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(is.read_message()?));
- },
- 5 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_is_trash = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_is_trash::is_trash(is.read_bool()?));
- },
- _ => {
- ::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.app_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.app_id);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateAppPayload_oneof_one_of_name::name(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateAppPayload_oneof_one_of_desc::desc(ref v) => {
- my_size += ::protobuf::rt::string_size(3, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_color_style {
- match v {
- &UpdateAppPayload_oneof_one_of_color_style::color_style(ref v) => {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
- match v {
- &UpdateAppPayload_oneof_one_of_is_trash::is_trash(v) => {
- 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.app_id.is_empty() {
- os.write_string(1, &self.app_id)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateAppPayload_oneof_one_of_name::name(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateAppPayload_oneof_one_of_desc::desc(ref v) => {
- os.write_string(3, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_color_style {
- match v {
- &UpdateAppPayload_oneof_one_of_color_style::color_style(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)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
- match v {
- &UpdateAppPayload_oneof_one_of_is_trash::is_trash(v) => {
- os.write_bool(5, v)?;
- },
- };
- }
- 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() -> UpdateAppPayload {
- UpdateAppPayload::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>(
- "app_id",
- |m: &UpdateAppPayload| { &m.app_id },
- |m: &mut UpdateAppPayload| { &mut m.app_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "name",
- UpdateAppPayload::has_name,
- UpdateAppPayload::get_name,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "desc",
- UpdateAppPayload::has_desc,
- UpdateAppPayload::get_desc,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ColorStyle>(
- "color_style",
- UpdateAppPayload::has_color_style,
- UpdateAppPayload::get_color_style,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
- "is_trash",
- UpdateAppPayload::has_is_trash,
- UpdateAppPayload::get_is_trash,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateAppPayload>(
- "UpdateAppPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UpdateAppPayload {
- static instance: ::protobuf::rt::LazyV2<UpdateAppPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UpdateAppPayload::new)
- }
-}
-
-impl ::protobuf::Clear for UpdateAppPayload {
- fn clear(&mut self) {
- self.app_id.clear();
- self.one_of_name = ::std::option::Option::None;
- self.one_of_desc = ::std::option::Option::None;
- self.one_of_color_style = ::std::option::Option::None;
- self.one_of_is_trash = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UpdateAppPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UpdateAppPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UpdateAppParams {
- // message fields
- pub app_id: ::std::string::String,
- // message oneof groups
- pub one_of_name: ::std::option::Option<UpdateAppParams_oneof_one_of_name>,
- pub one_of_desc: ::std::option::Option<UpdateAppParams_oneof_one_of_desc>,
- pub one_of_color_style: ::std::option::Option<UpdateAppParams_oneof_one_of_color_style>,
- pub one_of_is_trash: ::std::option::Option<UpdateAppParams_oneof_one_of_is_trash>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UpdateAppParams {
- fn default() -> &'a UpdateAppParams {
- <UpdateAppParams as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateAppParams_oneof_one_of_name {
- name(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateAppParams_oneof_one_of_desc {
- desc(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateAppParams_oneof_one_of_color_style {
- color_style(ColorStyle),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateAppParams_oneof_one_of_is_trash {
- is_trash(bool),
-}
-
-impl UpdateAppParams {
- pub fn new() -> UpdateAppParams {
- ::std::default::Default::default()
- }
-
- // string app_id = 1;
-
-
- pub fn get_app_id(&self) -> &str {
- &self.app_id
- }
- pub fn clear_app_id(&mut self) {
- self.app_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_app_id(&mut self, v: ::std::string::String) {
- self.app_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_app_id(&mut self) -> &mut ::std::string::String {
- &mut self.app_id
- }
-
- // Take field
- pub fn take_app_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.app_id, ::std::string::String::new())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_name(&mut self) {
- self.one_of_name = ::std::option::Option::None;
- }
-
- pub fn has_name(&self) -> bool {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(_)) = self.one_of_name {
- } else {
- self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(::std::string::String::new()));
- }
- match self.one_of_name {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- if self.has_name() {
- match self.one_of_name.take() {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_desc(&mut self) {
- self.one_of_desc = ::std::option::Option::None;
- }
-
- pub fn has_desc(&self) -> bool {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(_)) = self.one_of_desc {
- } else {
- self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(::std::string::String::new()));
- }
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- if self.has_desc() {
- match self.one_of_desc.take() {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // .ColorStyle color_style = 4;
-
-
- pub fn get_color_style(&self) -> &ColorStyle {
- match self.one_of_color_style {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref v)) => v,
- _ => <ColorStyle as ::protobuf::Message>::default_instance(),
- }
- }
- pub fn clear_color_style(&mut self) {
- self.one_of_color_style = ::std::option::Option::None;
- }
-
- pub fn has_color_style(&self) -> bool {
- match self.one_of_color_style {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_color_style(&mut self, v: ColorStyle) {
- self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_color_style(&mut self) -> &mut ColorStyle {
- if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(_)) = self.one_of_color_style {
- } else {
- self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(ColorStyle::new()));
- }
- match self.one_of_color_style {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_color_style(&mut self) -> ColorStyle {
- if self.has_color_style() {
- match self.one_of_color_style.take() {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(v)) => v,
- _ => panic!(),
- }
- } else {
- ColorStyle::new()
- }
- }
-
- // bool is_trash = 5;
-
-
- pub fn get_is_trash(&self) -> bool {
- match self.one_of_is_trash {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(v)) => v,
- _ => false,
- }
- }
- pub fn clear_is_trash(&mut self) {
- self.one_of_is_trash = ::std::option::Option::None;
- }
-
- pub fn has_is_trash(&self) -> bool {
- match self.one_of_is_trash {
- ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_is_trash(&mut self, v: bool) {
- self.one_of_is_trash = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(v))
- }
-}
-
-impl ::protobuf::Message for UpdateAppParams {
- fn is_initialized(&self) -> bool {
- if let Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref v)) = self.one_of_color_style {
- 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.app_id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(is.read_string()?));
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(is.read_string()?));
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(is.read_message()?));
- },
- 5 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_is_trash = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(is.read_bool()?));
- },
- _ => {
- ::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.app_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.app_id);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateAppParams_oneof_one_of_name::name(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateAppParams_oneof_one_of_desc::desc(ref v) => {
- my_size += ::protobuf::rt::string_size(3, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_color_style {
- match v {
- &UpdateAppParams_oneof_one_of_color_style::color_style(ref v) => {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
- match v {
- &UpdateAppParams_oneof_one_of_is_trash::is_trash(v) => {
- 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.app_id.is_empty() {
- os.write_string(1, &self.app_id)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateAppParams_oneof_one_of_name::name(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateAppParams_oneof_one_of_desc::desc(ref v) => {
- os.write_string(3, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_color_style {
- match v {
- &UpdateAppParams_oneof_one_of_color_style::color_style(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)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
- match v {
- &UpdateAppParams_oneof_one_of_is_trash::is_trash(v) => {
- os.write_bool(5, v)?;
- },
- };
- }
- 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() -> UpdateAppParams {
- UpdateAppParams::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>(
- "app_id",
- |m: &UpdateAppParams| { &m.app_id },
- |m: &mut UpdateAppParams| { &mut m.app_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "name",
- UpdateAppParams::has_name,
- UpdateAppParams::get_name,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "desc",
- UpdateAppParams::has_desc,
- UpdateAppParams::get_desc,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ColorStyle>(
- "color_style",
- UpdateAppParams::has_color_style,
- UpdateAppParams::get_color_style,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
- "is_trash",
- UpdateAppParams::has_is_trash,
- UpdateAppParams::get_is_trash,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateAppParams>(
- "UpdateAppParams",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UpdateAppParams {
- static instance: ::protobuf::rt::LazyV2<UpdateAppParams> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UpdateAppParams::new)
- }
-}
-
-impl ::protobuf::Clear for UpdateAppParams {
- fn clear(&mut self) {
- self.app_id.clear();
- self.one_of_name = ::std::option::Option::None;
- self.one_of_desc = ::std::option::Option::None;
- self.one_of_color_style = ::std::option::Option::None;
- self.one_of_is_trash = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UpdateAppParams {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UpdateAppParams {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\tapp.proto\x1a\nview.proto\"\xef\x01\n\x03App\x12\x0e\n\x02id\x18\x01\
- \x20\x01(\tR\x02id\x12!\n\x0cworkspace_id\x18\x02\x20\x01(\tR\x0bworkspa\
- ceId\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\
- \x04\x20\x01(\tR\x04desc\x12-\n\nbelongings\x18\x05\x20\x01(\x0b2\r.Repe\
- atedViewR\nbelongings\x12\x18\n\x07version\x18\x06\x20\x01(\x03R\x07vers\
- ion\x12#\n\rmodified_time\x18\x07\x20\x01(\x03R\x0cmodifiedTime\x12\x1f\
- \n\x0bcreate_time\x18\x08\x20\x01(\x03R\ncreateTime\")\n\x0bRepeatedApp\
- \x12\x1a\n\x05items\x18\x01\x20\x03(\x0b2\x04.AppR\x05items\"\x8b\x01\n\
- \x10CreateAppPayload\x12!\n\x0cworkspace_id\x18\x01\x20\x01(\tR\x0bworks\
- paceId\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\
- \x18\x03\x20\x01(\tR\x04desc\x12,\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\
- \x0b.ColorStyleR\ncolorStyle\"-\n\nColorStyle\x12\x1f\n\x0btheme_color\
- \x18\x01\x20\x01(\tR\nthemeColor\"\x8a\x01\n\x0fCreateAppParams\x12!\n\
- \x0cworkspace_id\x18\x01\x20\x01(\tR\x0bworkspaceId\x12\x12\n\x04name\
- \x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04de\
- sc\x12,\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\x0b.ColorStyleR\ncolorSty\
- le\"\x1d\n\x05AppId\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\"\
- \xe9\x01\n\x10UpdateAppPayload\x12\x15\n\x06app_id\x18\x01\x20\x01(\tR\
- \x05appId\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x14\n\x04\
- desc\x18\x03\x20\x01(\tH\x01R\x04desc\x12.\n\x0bcolor_style\x18\x04\x20\
- \x01(\x0b2\x0b.ColorStyleH\x02R\ncolorStyle\x12\x1b\n\x08is_trash\x18\
- \x05\x20\x01(\x08H\x03R\x07isTrashB\r\n\x0bone_of_nameB\r\n\x0bone_of_de\
- scB\x14\n\x12one_of_color_styleB\x11\n\x0fone_of_is_trash\"\xe8\x01\n\
- \x0fUpdateAppParams\x12\x15\n\x06app_id\x18\x01\x20\x01(\tR\x05appId\x12\
- \x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x14\n\x04desc\x18\x03\
- \x20\x01(\tH\x01R\x04desc\x12.\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\
- \x0b.ColorStyleH\x02R\ncolorStyle\x12\x1b\n\x08is_trash\x18\x05\x20\x01(\
- \x08H\x03R\x07isTrashB\r\n\x0bone_of_nameB\r\n\x0bone_of_descB\x14\n\x12\
- one_of_color_styleB\x11\n\x0fone_of_is_trashb\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()
- })
-}
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs
deleted file mode 100644
index 64debcc99c..0000000000
--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod app;
-pub use app::*;
-
-mod view_info;
-pub use view_info::*;
-
-mod view;
-pub use view::*;
-
-mod trash;
-pub use trash::*;
-
-mod workspace;
-pub use workspace::*;
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/trash.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/trash.rs
deleted file mode 100644
index 26d9c70016..0000000000
--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/trash.rs
+++ /dev/null
@@ -1,962 +0,0 @@
-// 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 `trash.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 Trash {
- // message fields
- pub id: ::std::string::String,
- pub name: ::std::string::String,
- pub modified_time: i64,
- pub create_time: i64,
- pub ty: TrashType,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a Trash {
- fn default() -> &'a Trash {
- <Trash as ::protobuf::Message>::default_instance()
- }
-}
-
-impl Trash {
- pub fn new() -> Trash {
- ::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())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // int64 modified_time = 3;
-
-
- pub fn get_modified_time(&self) -> i64 {
- self.modified_time
- }
- pub fn clear_modified_time(&mut self) {
- self.modified_time = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_modified_time(&mut self, v: i64) {
- self.modified_time = v;
- }
-
- // int64 create_time = 4;
-
-
- pub fn get_create_time(&self) -> i64 {
- self.create_time
- }
- pub fn clear_create_time(&mut self) {
- self.create_time = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_create_time(&mut self, v: i64) {
- self.create_time = v;
- }
-
- // .TrashType ty = 5;
-
-
- pub fn get_ty(&self) -> TrashType {
- self.ty
- }
- pub fn clear_ty(&mut self) {
- self.ty = TrashType::Unknown;
- }
-
- // Param is passed by value, moved
- pub fn set_ty(&mut self, v: TrashType) {
- self.ty = v;
- }
-}
-
-impl ::protobuf::Message for Trash {
- 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.id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 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.modified_time = 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.create_time = tmp;
- },
- 5 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 5, &mut self.unknown_fields)?
- },
- _ => {
- ::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 !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if self.modified_time != 0 {
- my_size += ::protobuf::rt::value_size(3, self.modified_time, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.create_time != 0 {
- my_size += ::protobuf::rt::value_size(4, self.create_time, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.ty != TrashType::Unknown {
- my_size += ::protobuf::rt::enum_size(5, self.ty);
- }
- 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 !self.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if self.modified_time != 0 {
- os.write_int64(3, self.modified_time)?;
- }
- if self.create_time != 0 {
- os.write_int64(4, self.create_time)?;
- }
- if self.ty != TrashType::Unknown {
- os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.ty))?;
- }
- 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() -> Trash {
- Trash::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: &Trash| { &m.id },
- |m: &mut Trash| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &Trash| { &m.name },
- |m: &mut Trash| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "modified_time",
- |m: &Trash| { &m.modified_time },
- |m: &mut Trash| { &mut m.modified_time },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "create_time",
- |m: &Trash| { &m.create_time },
- |m: &mut Trash| { &mut m.create_time },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<TrashType>>(
- "ty",
- |m: &Trash| { &m.ty },
- |m: &mut Trash| { &mut m.ty },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<Trash>(
- "Trash",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static Trash {
- static instance: ::protobuf::rt::LazyV2<Trash> = ::protobuf::rt::LazyV2::INIT;
- instance.get(Trash::new)
- }
-}
-
-impl ::protobuf::Clear for Trash {
- fn clear(&mut self) {
- self.id.clear();
- self.name.clear();
- self.modified_time = 0;
- self.create_time = 0;
- self.ty = TrashType::Unknown;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for Trash {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for Trash {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedTrash {
- // message fields
- pub items: ::protobuf::RepeatedField<Trash>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedTrash {
- fn default() -> &'a RepeatedTrash {
- <RepeatedTrash as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedTrash {
- pub fn new() -> RepeatedTrash {
- ::std::default::Default::default()
- }
-
- // repeated .Trash items = 1;
-
-
- pub fn get_items(&self) -> &[Trash] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Trash>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Trash> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Trash> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedTrash {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- _ => {
- ::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.items {
- 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.items {
- 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) -> &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() -> RepeatedTrash {
- RepeatedTrash::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Trash>>(
- "items",
- |m: &RepeatedTrash| { &m.items },
- |m: &mut RepeatedTrash| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedTrash>(
- "RepeatedTrash",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedTrash {
- static instance: ::protobuf::rt::LazyV2<RepeatedTrash> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedTrash::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedTrash {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedTrash {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedTrash {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedTrashId {
- // message fields
- pub items: ::protobuf::RepeatedField<TrashId>,
- pub delete_all: bool,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedTrashId {
- fn default() -> &'a RepeatedTrashId {
- <RepeatedTrashId as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedTrashId {
- pub fn new() -> RepeatedTrashId {
- ::std::default::Default::default()
- }
-
- // repeated .TrashId items = 1;
-
-
- pub fn get_items(&self) -> &[TrashId] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<TrashId>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<TrashId> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<TrashId> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-
- // bool delete_all = 2;
-
-
- pub fn get_delete_all(&self) -> bool {
- self.delete_all
- }
- pub fn clear_delete_all(&mut self) {
- self.delete_all = false;
- }
-
- // Param is passed by value, moved
- pub fn set_delete_all(&mut self, v: bool) {
- self.delete_all = v;
- }
-}
-
-impl ::protobuf::Message for RepeatedTrashId {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- 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.delete_all = 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;
- for value in &self.items {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- };
- if self.delete_all != 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<()> {
- for v in &self.items {
- 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.delete_all != false {
- os.write_bool(2, self.delete_all)?;
- }
- 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() -> RepeatedTrashId {
- RepeatedTrashId::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<TrashId>>(
- "items",
- |m: &RepeatedTrashId| { &m.items },
- |m: &mut RepeatedTrashId| { &mut m.items },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "delete_all",
- |m: &RepeatedTrashId| { &m.delete_all },
- |m: &mut RepeatedTrashId| { &mut m.delete_all },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedTrashId>(
- "RepeatedTrashId",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedTrashId {
- static instance: ::protobuf::rt::LazyV2<RepeatedTrashId> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedTrashId::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedTrashId {
- fn clear(&mut self) {
- self.items.clear();
- self.delete_all = false;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedTrashId {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedTrashId {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct TrashId {
- // message fields
- pub id: ::std::string::String,
- pub ty: TrashType,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a TrashId {
- fn default() -> &'a TrashId {
- <TrashId as ::protobuf::Message>::default_instance()
- }
-}
-
-impl TrashId {
- pub fn new() -> TrashId {
- ::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())
- }
-
- // .TrashType ty = 2;
-
-
- pub fn get_ty(&self) -> TrashType {
- self.ty
- }
- pub fn clear_ty(&mut self) {
- self.ty = TrashType::Unknown;
- }
-
- // Param is passed by value, moved
- pub fn set_ty(&mut self, v: TrashType) {
- self.ty = v;
- }
-}
-
-impl ::protobuf::Message for TrashId {
- 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.id)?;
- },
- 2 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 2, &mut self.unknown_fields)?
- },
- _ => {
- ::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 self.ty != TrashType::Unknown {
- my_size += ::protobuf::rt::enum_size(2, self.ty);
- }
- 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 self.ty != TrashType::Unknown {
- os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.ty))?;
- }
- 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() -> TrashId {
- TrashId::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: &TrashId| { &m.id },
- |m: &mut TrashId| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<TrashType>>(
- "ty",
- |m: &TrashId| { &m.ty },
- |m: &mut TrashId| { &mut m.ty },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<TrashId>(
- "TrashId",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static TrashId {
- static instance: ::protobuf::rt::LazyV2<TrashId> = ::protobuf::rt::LazyV2::INIT;
- instance.get(TrashId::new)
- }
-}
-
-impl ::protobuf::Clear for TrashId {
- fn clear(&mut self) {
- self.id.clear();
- self.ty = TrashType::Unknown;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for TrashId {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for TrashId {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum TrashType {
- Unknown = 0,
- TrashView = 1,
- TrashApp = 2,
-}
-
-impl ::protobuf::ProtobufEnum for TrashType {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<TrashType> {
- match value {
- 0 => ::std::option::Option::Some(TrashType::Unknown),
- 1 => ::std::option::Option::Some(TrashType::TrashView),
- 2 => ::std::option::Option::Some(TrashType::TrashApp),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [TrashType] = &[
- TrashType::Unknown,
- TrashType::TrashView,
- TrashType::TrashApp,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<TrashType>("TrashType", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for TrashType {
-}
-
-impl ::std::default::Default for TrashType {
- fn default() -> Self {
- TrashType::Unknown
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for TrashType {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0btrash.proto\"\x8d\x01\n\x05Trash\x12\x0e\n\x02id\x18\x01\x20\x01(\
- \tR\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12#\n\rmodified\
- _time\x18\x03\x20\x01(\x03R\x0cmodifiedTime\x12\x1f\n\x0bcreate_time\x18\
- \x04\x20\x01(\x03R\ncreateTime\x12\x1a\n\x02ty\x18\x05\x20\x01(\x0e2\n.T\
- rashTypeR\x02ty\"-\n\rRepeatedTrash\x12\x1c\n\x05items\x18\x01\x20\x03(\
- \x0b2\x06.TrashR\x05items\"P\n\x0fRepeatedTrashId\x12\x1e\n\x05items\x18\
- \x01\x20\x03(\x0b2\x08.TrashIdR\x05items\x12\x1d\n\ndelete_all\x18\x02\
- \x20\x01(\x08R\tdeleteAll\"5\n\x07TrashId\x12\x0e\n\x02id\x18\x01\x20\
- \x01(\tR\x02id\x12\x1a\n\x02ty\x18\x02\x20\x01(\x0e2\n.TrashTypeR\x02ty*\
- 5\n\tTrashType\x12\x0b\n\x07Unknown\x10\0\x12\r\n\tTrashView\x10\x01\x12\
- \x0c\n\x08TrashApp\x10\x02b\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()
- })
-}
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rs
deleted file mode 100644
index 3730b36759..0000000000
--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rs
+++ /dev/null
@@ -1,2972 +0,0 @@
-// 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 `view.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 View {
- // message fields
- pub id: ::std::string::String,
- pub belong_to_id: ::std::string::String,
- pub name: ::std::string::String,
- pub data_type: ViewDataType,
- pub modified_time: i64,
- pub create_time: i64,
- pub plugin_type: i32,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a View {
- fn default() -> &'a View {
- <View as ::protobuf::Message>::default_instance()
- }
-}
-
-impl View {
- pub fn new() -> View {
- ::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())
- }
-
- // string belong_to_id = 2;
-
-
- pub fn get_belong_to_id(&self) -> &str {
- &self.belong_to_id
- }
- pub fn clear_belong_to_id(&mut self) {
- self.belong_to_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_belong_to_id(&mut self, v: ::std::string::String) {
- self.belong_to_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_belong_to_id(&mut self) -> &mut ::std::string::String {
- &mut self.belong_to_id
- }
-
- // Take field
- pub fn take_belong_to_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.belong_to_id, ::std::string::String::new())
- }
-
- // string name = 3;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // .ViewDataType data_type = 4;
-
-
- pub fn get_data_type(&self) -> ViewDataType {
- self.data_type
- }
- pub fn clear_data_type(&mut self) {
- self.data_type = ViewDataType::TextBlock;
- }
-
- // Param is passed by value, moved
- pub fn set_data_type(&mut self, v: ViewDataType) {
- self.data_type = v;
- }
-
- // int64 modified_time = 5;
-
-
- pub fn get_modified_time(&self) -> i64 {
- self.modified_time
- }
- pub fn clear_modified_time(&mut self) {
- self.modified_time = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_modified_time(&mut self, v: i64) {
- self.modified_time = v;
- }
-
- // int64 create_time = 6;
-
-
- pub fn get_create_time(&self) -> i64 {
- self.create_time
- }
- pub fn clear_create_time(&mut self) {
- self.create_time = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_create_time(&mut self, v: i64) {
- self.create_time = v;
- }
-
- // int32 plugin_type = 7;
-
-
- pub fn get_plugin_type(&self) -> i32 {
- self.plugin_type
- }
- pub fn clear_plugin_type(&mut self) {
- self.plugin_type = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_plugin_type(&mut self, v: i32) {
- self.plugin_type = v;
- }
-}
-
-impl ::protobuf::Message for View {
- 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.id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.belong_to_id)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 4 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.data_type, 4, &mut self.unknown_fields)?
- },
- 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.modified_time = 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.create_time = tmp;
- },
- 7 => {
- 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.plugin_type = 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.id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.id);
- }
- if !self.belong_to_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.belong_to_id);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.name);
- }
- if self.data_type != ViewDataType::TextBlock {
- my_size += ::protobuf::rt::enum_size(4, self.data_type);
- }
- if self.modified_time != 0 {
- my_size += ::protobuf::rt::value_size(5, self.modified_time, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.create_time != 0 {
- my_size += ::protobuf::rt::value_size(6, self.create_time, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.plugin_type != 0 {
- my_size += ::protobuf::rt::value_size(7, self.plugin_type, ::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.id.is_empty() {
- os.write_string(1, &self.id)?;
- }
- if !self.belong_to_id.is_empty() {
- os.write_string(2, &self.belong_to_id)?;
- }
- if !self.name.is_empty() {
- os.write_string(3, &self.name)?;
- }
- if self.data_type != ViewDataType::TextBlock {
- os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.data_type))?;
- }
- if self.modified_time != 0 {
- os.write_int64(5, self.modified_time)?;
- }
- if self.create_time != 0 {
- os.write_int64(6, self.create_time)?;
- }
- if self.plugin_type != 0 {
- os.write_int32(7, self.plugin_type)?;
- }
- 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() -> View {
- View::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: &View| { &m.id },
- |m: &mut View| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "belong_to_id",
- |m: &View| { &m.belong_to_id },
- |m: &mut View| { &mut m.belong_to_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &View| { &m.name },
- |m: &mut View| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ViewDataType>>(
- "data_type",
- |m: &View| { &m.data_type },
- |m: &mut View| { &mut m.data_type },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "modified_time",
- |m: &View| { &m.modified_time },
- |m: &mut View| { &mut m.modified_time },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "create_time",
- |m: &View| { &m.create_time },
- |m: &mut View| { &mut m.create_time },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "plugin_type",
- |m: &View| { &m.plugin_type },
- |m: &mut View| { &mut m.plugin_type },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<View>(
- "View",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static View {
- static instance: ::protobuf::rt::LazyV2<View> = ::protobuf::rt::LazyV2::INIT;
- instance.get(View::new)
- }
-}
-
-impl ::protobuf::Clear for View {
- fn clear(&mut self) {
- self.id.clear();
- self.belong_to_id.clear();
- self.name.clear();
- self.data_type = ViewDataType::TextBlock;
- self.modified_time = 0;
- self.create_time = 0;
- self.plugin_type = 0;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for View {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for View {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedView {
- // message fields
- pub items: ::protobuf::RepeatedField<View>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedView {
- fn default() -> &'a RepeatedView {
- <RepeatedView as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedView {
- pub fn new() -> RepeatedView {
- ::std::default::Default::default()
- }
-
- // repeated .View items = 1;
-
-
- pub fn get_items(&self) -> &[View] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<View>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<View> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<View> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedView {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- _ => {
- ::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.items {
- 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.items {
- 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) -> &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() -> RepeatedView {
- RepeatedView::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<View>>(
- "items",
- |m: &RepeatedView| { &m.items },
- |m: &mut RepeatedView| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedView>(
- "RepeatedView",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedView {
- static instance: ::protobuf::rt::LazyV2<RepeatedView> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedView::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedView {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedView {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedView {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedViewId {
- // message fields
- pub items: ::protobuf::RepeatedField<::std::string::String>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedViewId {
- fn default() -> &'a RepeatedViewId {
- <RepeatedViewId as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedViewId {
- pub fn new() -> RepeatedViewId {
- ::std::default::Default::default()
- }
-
- // repeated string items = 1;
-
-
- pub fn get_items(&self) -> &[::std::string::String] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedViewId {
- 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_repeated_string_into(wire_type, is, &mut self.items)?;
- },
- _ => {
- ::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.items {
- my_size += ::protobuf::rt::string_size(1, &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<()> {
- for v in &self.items {
- os.write_string(1, &v)?;
- };
- 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() -> RepeatedViewId {
- RepeatedViewId::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "items",
- |m: &RepeatedViewId| { &m.items },
- |m: &mut RepeatedViewId| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedViewId>(
- "RepeatedViewId",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedViewId {
- static instance: ::protobuf::rt::LazyV2<RepeatedViewId> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedViewId::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedViewId {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedViewId {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedViewId {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct CreateViewPayload {
- // message fields
- pub belong_to_id: ::std::string::String,
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- pub data_type: ViewDataType,
- pub plugin_type: i32,
- pub data: ::std::vec::Vec<u8>,
- // message oneof groups
- pub one_of_thumbnail: ::std::option::Option<CreateViewPayload_oneof_one_of_thumbnail>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a CreateViewPayload {
- fn default() -> &'a CreateViewPayload {
- <CreateViewPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum CreateViewPayload_oneof_one_of_thumbnail {
- thumbnail(::std::string::String),
-}
-
-impl CreateViewPayload {
- pub fn new() -> CreateViewPayload {
- ::std::default::Default::default()
- }
-
- // string belong_to_id = 1;
-
-
- pub fn get_belong_to_id(&self) -> &str {
- &self.belong_to_id
- }
- pub fn clear_belong_to_id(&mut self) {
- self.belong_to_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_belong_to_id(&mut self, v: ::std::string::String) {
- self.belong_to_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_belong_to_id(&mut self) -> &mut ::std::string::String {
- &mut self.belong_to_id
- }
-
- // Take field
- pub fn take_belong_to_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.belong_to_id, ::std::string::String::new())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-
- // string thumbnail = 4;
-
-
- pub fn get_thumbnail(&self) -> &str {
- match self.one_of_thumbnail {
- ::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_thumbnail(&mut self) {
- self.one_of_thumbnail = ::std::option::Option::None;
- }
-
- pub fn has_thumbnail(&self) -> bool {
- match self.one_of_thumbnail {
- ::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_thumbnail(&mut self, v: ::std::string::String) {
- self.one_of_thumbnail = ::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail {
- } else {
- self.one_of_thumbnail = ::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(::std::string::String::new()));
- }
- match self.one_of_thumbnail {
- ::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_thumbnail(&mut self) -> ::std::string::String {
- if self.has_thumbnail() {
- match self.one_of_thumbnail.take() {
- ::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // .ViewDataType data_type = 5;
-
-
- pub fn get_data_type(&self) -> ViewDataType {
- self.data_type
- }
- pub fn clear_data_type(&mut self) {
- self.data_type = ViewDataType::TextBlock;
- }
-
- // Param is passed by value, moved
- pub fn set_data_type(&mut self, v: ViewDataType) {
- self.data_type = v;
- }
-
- // int32 plugin_type = 6;
-
-
- pub fn get_plugin_type(&self) -> i32 {
- self.plugin_type
- }
- pub fn clear_plugin_type(&mut self) {
- self.plugin_type = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_plugin_type(&mut self, v: i32) {
- self.plugin_type = v;
- }
-
- // bytes data = 7;
-
-
- pub fn get_data(&self) -> &[u8] {
- &self.data
- }
- 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())
- }
-}
-
-impl ::protobuf::Message for CreateViewPayload {
- 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.belong_to_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_thumbnail = ::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(is.read_string()?));
- },
- 5 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.data_type, 5, &mut self.unknown_fields)?
- },
- 6 => {
- 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.plugin_type = tmp;
- },
- 7 => {
- ::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.belong_to_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.belong_to_id);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.desc);
- }
- if self.data_type != ViewDataType::TextBlock {
- my_size += ::protobuf::rt::enum_size(5, self.data_type);
- }
- if self.plugin_type != 0 {
- my_size += ::protobuf::rt::value_size(6, self.plugin_type, ::protobuf::wire_format::WireTypeVarint);
- }
- if !self.data.is_empty() {
- my_size += ::protobuf::rt::bytes_size(7, &self.data);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
- match v {
- &CreateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v) => {
- my_size += ::protobuf::rt::string_size(4, &v);
- },
- };
- }
- 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.belong_to_id.is_empty() {
- os.write_string(1, &self.belong_to_id)?;
- }
- if !self.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(3, &self.desc)?;
- }
- if self.data_type != ViewDataType::TextBlock {
- os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.data_type))?;
- }
- if self.plugin_type != 0 {
- os.write_int32(6, self.plugin_type)?;
- }
- if !self.data.is_empty() {
- os.write_bytes(7, &self.data)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
- match v {
- &CreateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v) => {
- os.write_string(4, v)?;
- },
- };
- }
- 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() -> CreateViewPayload {
- CreateViewPayload::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>(
- "belong_to_id",
- |m: &CreateViewPayload| { &m.belong_to_id },
- |m: &mut CreateViewPayload| { &mut m.belong_to_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &CreateViewPayload| { &m.name },
- |m: &mut CreateViewPayload| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &CreateViewPayload| { &m.desc },
- |m: &mut CreateViewPayload| { &mut m.desc },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "thumbnail",
- CreateViewPayload::has_thumbnail,
- CreateViewPayload::get_thumbnail,
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ViewDataType>>(
- "data_type",
- |m: &CreateViewPayload| { &m.data_type },
- |m: &mut CreateViewPayload| { &mut m.data_type },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "plugin_type",
- |m: &CreateViewPayload| { &m.plugin_type },
- |m: &mut CreateViewPayload| { &mut m.plugin_type },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "data",
- |m: &CreateViewPayload| { &m.data },
- |m: &mut CreateViewPayload| { &mut m.data },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateViewPayload>(
- "CreateViewPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static CreateViewPayload {
- static instance: ::protobuf::rt::LazyV2<CreateViewPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(CreateViewPayload::new)
- }
-}
-
-impl ::protobuf::Clear for CreateViewPayload {
- fn clear(&mut self) {
- self.belong_to_id.clear();
- self.name.clear();
- self.desc.clear();
- self.one_of_thumbnail = ::std::option::Option::None;
- self.data_type = ViewDataType::TextBlock;
- self.plugin_type = 0;
- self.data.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for CreateViewPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for CreateViewPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct CreateViewParams {
- // message fields
- pub belong_to_id: ::std::string::String,
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- pub thumbnail: ::std::string::String,
- pub data_type: ViewDataType,
- pub view_id: ::std::string::String,
- pub data: ::std::vec::Vec<u8>,
- pub plugin_type: i32,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a CreateViewParams {
- fn default() -> &'a CreateViewParams {
- <CreateViewParams as ::protobuf::Message>::default_instance()
- }
-}
-
-impl CreateViewParams {
- pub fn new() -> CreateViewParams {
- ::std::default::Default::default()
- }
-
- // string belong_to_id = 1;
-
-
- pub fn get_belong_to_id(&self) -> &str {
- &self.belong_to_id
- }
- pub fn clear_belong_to_id(&mut self) {
- self.belong_to_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_belong_to_id(&mut self, v: ::std::string::String) {
- self.belong_to_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_belong_to_id(&mut self) -> &mut ::std::string::String {
- &mut self.belong_to_id
- }
-
- // Take field
- pub fn take_belong_to_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.belong_to_id, ::std::string::String::new())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-
- // string thumbnail = 4;
-
-
- pub fn get_thumbnail(&self) -> &str {
- &self.thumbnail
- }
- pub fn clear_thumbnail(&mut self) {
- self.thumbnail.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_thumbnail(&mut self, v: ::std::string::String) {
- self.thumbnail = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String {
- &mut self.thumbnail
- }
-
- // Take field
- pub fn take_thumbnail(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.thumbnail, ::std::string::String::new())
- }
-
- // .ViewDataType data_type = 5;
-
-
- pub fn get_data_type(&self) -> ViewDataType {
- self.data_type
- }
- pub fn clear_data_type(&mut self) {
- self.data_type = ViewDataType::TextBlock;
- }
-
- // Param is passed by value, moved
- pub fn set_data_type(&mut self, v: ViewDataType) {
- self.data_type = v;
- }
-
- // string view_id = 6;
-
-
- pub fn get_view_id(&self) -> &str {
- &self.view_id
- }
- pub fn clear_view_id(&mut self) {
- self.view_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_view_id(&mut self, v: ::std::string::String) {
- self.view_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_view_id(&mut self) -> &mut ::std::string::String {
- &mut self.view_id
- }
-
- // Take field
- pub fn take_view_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.view_id, ::std::string::String::new())
- }
-
- // bytes data = 7;
-
-
- pub fn get_data(&self) -> &[u8] {
- &self.data
- }
- 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())
- }
-
- // int32 plugin_type = 8;
-
-
- pub fn get_plugin_type(&self) -> i32 {
- self.plugin_type
- }
- pub fn clear_plugin_type(&mut self) {
- self.plugin_type = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_plugin_type(&mut self, v: i32) {
- self.plugin_type = v;
- }
-}
-
-impl ::protobuf::Message for CreateViewParams {
- 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.belong_to_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.thumbnail)?;
- },
- 5 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.data_type, 5, &mut self.unknown_fields)?
- },
- 6 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.view_id)?;
- },
- 7 => {
- ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
- },
- 8 => {
- 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.plugin_type = 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.belong_to_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.belong_to_id);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.desc);
- }
- if !self.thumbnail.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.thumbnail);
- }
- if self.data_type != ViewDataType::TextBlock {
- my_size += ::protobuf::rt::enum_size(5, self.data_type);
- }
- if !self.view_id.is_empty() {
- my_size += ::protobuf::rt::string_size(6, &self.view_id);
- }
- if !self.data.is_empty() {
- my_size += ::protobuf::rt::bytes_size(7, &self.data);
- }
- if self.plugin_type != 0 {
- my_size += ::protobuf::rt::value_size(8, self.plugin_type, ::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.belong_to_id.is_empty() {
- os.write_string(1, &self.belong_to_id)?;
- }
- if !self.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(3, &self.desc)?;
- }
- if !self.thumbnail.is_empty() {
- os.write_string(4, &self.thumbnail)?;
- }
- if self.data_type != ViewDataType::TextBlock {
- os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.data_type))?;
- }
- if !self.view_id.is_empty() {
- os.write_string(6, &self.view_id)?;
- }
- if !self.data.is_empty() {
- os.write_bytes(7, &self.data)?;
- }
- if self.plugin_type != 0 {
- os.write_int32(8, self.plugin_type)?;
- }
- 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() -> CreateViewParams {
- CreateViewParams::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>(
- "belong_to_id",
- |m: &CreateViewParams| { &m.belong_to_id },
- |m: &mut CreateViewParams| { &mut m.belong_to_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &CreateViewParams| { &m.name },
- |m: &mut CreateViewParams| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &CreateViewParams| { &m.desc },
- |m: &mut CreateViewParams| { &mut m.desc },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "thumbnail",
- |m: &CreateViewParams| { &m.thumbnail },
- |m: &mut CreateViewParams| { &mut m.thumbnail },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ViewDataType>>(
- "data_type",
- |m: &CreateViewParams| { &m.data_type },
- |m: &mut CreateViewParams| { &mut m.data_type },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "view_id",
- |m: &CreateViewParams| { &m.view_id },
- |m: &mut CreateViewParams| { &mut m.view_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "data",
- |m: &CreateViewParams| { &m.data },
- |m: &mut CreateViewParams| { &mut m.data },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "plugin_type",
- |m: &CreateViewParams| { &m.plugin_type },
- |m: &mut CreateViewParams| { &mut m.plugin_type },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateViewParams>(
- "CreateViewParams",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static CreateViewParams {
- static instance: ::protobuf::rt::LazyV2<CreateViewParams> = ::protobuf::rt::LazyV2::INIT;
- instance.get(CreateViewParams::new)
- }
-}
-
-impl ::protobuf::Clear for CreateViewParams {
- fn clear(&mut self) {
- self.belong_to_id.clear();
- self.name.clear();
- self.desc.clear();
- self.thumbnail.clear();
- self.data_type = ViewDataType::TextBlock;
- self.view_id.clear();
- self.data.clear();
- self.plugin_type = 0;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for CreateViewParams {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for CreateViewParams {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ViewId {
- // 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 ViewId {
- fn default() -> &'a ViewId {
- <ViewId as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ViewId {
- pub fn new() -> ViewId {
- ::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 ViewId {
- 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() -> ViewId {
- ViewId::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: &ViewId| { &m.value },
- |m: &mut ViewId| { &mut m.value },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewId>(
- "ViewId",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ViewId {
- static instance: ::protobuf::rt::LazyV2<ViewId> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewId::new)
- }
-}
-
-impl ::protobuf::Clear for ViewId {
- fn clear(&mut self) {
- self.value.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ViewId {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewId {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UpdateViewPayload {
- // message fields
- pub view_id: ::std::string::String,
- // message oneof groups
- pub one_of_name: ::std::option::Option<UpdateViewPayload_oneof_one_of_name>,
- pub one_of_desc: ::std::option::Option<UpdateViewPayload_oneof_one_of_desc>,
- pub one_of_thumbnail: ::std::option::Option<UpdateViewPayload_oneof_one_of_thumbnail>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UpdateViewPayload {
- fn default() -> &'a UpdateViewPayload {
- <UpdateViewPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateViewPayload_oneof_one_of_name {
- name(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateViewPayload_oneof_one_of_desc {
- desc(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateViewPayload_oneof_one_of_thumbnail {
- thumbnail(::std::string::String),
-}
-
-impl UpdateViewPayload {
- pub fn new() -> UpdateViewPayload {
- ::std::default::Default::default()
- }
-
- // string view_id = 1;
-
-
- pub fn get_view_id(&self) -> &str {
- &self.view_id
- }
- pub fn clear_view_id(&mut self) {
- self.view_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_view_id(&mut self, v: ::std::string::String) {
- self.view_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_view_id(&mut self) -> &mut ::std::string::String {
- &mut self.view_id
- }
-
- // Take field
- pub fn take_view_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.view_id, ::std::string::String::new())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_name(&mut self) {
- self.one_of_name = ::std::option::Option::None;
- }
-
- pub fn has_name(&self) -> bool {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.one_of_name = ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(_)) = self.one_of_name {
- } else {
- self.one_of_name = ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(::std::string::String::new()));
- }
- match self.one_of_name {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- if self.has_name() {
- match self.one_of_name.take() {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_desc(&mut self) {
- self.one_of_desc = ::std::option::Option::None;
- }
-
- pub fn has_desc(&self) -> bool {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.one_of_desc = ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(_)) = self.one_of_desc {
- } else {
- self.one_of_desc = ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(::std::string::String::new()));
- }
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- if self.has_desc() {
- match self.one_of_desc.take() {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string thumbnail = 4;
-
-
- pub fn get_thumbnail(&self) -> &str {
- match self.one_of_thumbnail {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_thumbnail(&mut self) {
- self.one_of_thumbnail = ::std::option::Option::None;
- }
-
- pub fn has_thumbnail(&self) -> bool {
- match self.one_of_thumbnail {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_thumbnail(&mut self, v: ::std::string::String) {
- self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail {
- } else {
- self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(::std::string::String::new()));
- }
- match self.one_of_thumbnail {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_thumbnail(&mut self) -> ::std::string::String {
- if self.has_thumbnail() {
- match self.one_of_thumbnail.take() {
- ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for UpdateViewPayload {
- 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.view_id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_name = ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(is.read_string()?));
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_desc = ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(is.read_string()?));
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(is.read_string()?));
- },
- _ => {
- ::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.view_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.view_id);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateViewPayload_oneof_one_of_name::name(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateViewPayload_oneof_one_of_desc::desc(ref v) => {
- my_size += ::protobuf::rt::string_size(3, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
- match v {
- &UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v) => {
- my_size += ::protobuf::rt::string_size(4, &v);
- },
- };
- }
- 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.view_id.is_empty() {
- os.write_string(1, &self.view_id)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateViewPayload_oneof_one_of_name::name(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateViewPayload_oneof_one_of_desc::desc(ref v) => {
- os.write_string(3, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
- match v {
- &UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v) => {
- os.write_string(4, v)?;
- },
- };
- }
- 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() -> UpdateViewPayload {
- UpdateViewPayload::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>(
- "view_id",
- |m: &UpdateViewPayload| { &m.view_id },
- |m: &mut UpdateViewPayload| { &mut m.view_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "name",
- UpdateViewPayload::has_name,
- UpdateViewPayload::get_name,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "desc",
- UpdateViewPayload::has_desc,
- UpdateViewPayload::get_desc,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "thumbnail",
- UpdateViewPayload::has_thumbnail,
- UpdateViewPayload::get_thumbnail,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateViewPayload>(
- "UpdateViewPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UpdateViewPayload {
- static instance: ::protobuf::rt::LazyV2<UpdateViewPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UpdateViewPayload::new)
- }
-}
-
-impl ::protobuf::Clear for UpdateViewPayload {
- fn clear(&mut self) {
- self.view_id.clear();
- self.one_of_name = ::std::option::Option::None;
- self.one_of_desc = ::std::option::Option::None;
- self.one_of_thumbnail = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UpdateViewPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UpdateViewPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UpdateViewParams {
- // message fields
- pub view_id: ::std::string::String,
- // message oneof groups
- pub one_of_name: ::std::option::Option<UpdateViewParams_oneof_one_of_name>,
- pub one_of_desc: ::std::option::Option<UpdateViewParams_oneof_one_of_desc>,
- pub one_of_thumbnail: ::std::option::Option<UpdateViewParams_oneof_one_of_thumbnail>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UpdateViewParams {
- fn default() -> &'a UpdateViewParams {
- <UpdateViewParams as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateViewParams_oneof_one_of_name {
- name(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateViewParams_oneof_one_of_desc {
- desc(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateViewParams_oneof_one_of_thumbnail {
- thumbnail(::std::string::String),
-}
-
-impl UpdateViewParams {
- pub fn new() -> UpdateViewParams {
- ::std::default::Default::default()
- }
-
- // string view_id = 1;
-
-
- pub fn get_view_id(&self) -> &str {
- &self.view_id
- }
- pub fn clear_view_id(&mut self) {
- self.view_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_view_id(&mut self, v: ::std::string::String) {
- self.view_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_view_id(&mut self) -> &mut ::std::string::String {
- &mut self.view_id
- }
-
- // Take field
- pub fn take_view_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.view_id, ::std::string::String::new())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_name(&mut self) {
- self.one_of_name = ::std::option::Option::None;
- }
-
- pub fn has_name(&self) -> bool {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(_)) = self.one_of_name {
- } else {
- self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(::std::string::String::new()));
- }
- match self.one_of_name {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- if self.has_name() {
- match self.one_of_name.take() {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_desc(&mut self) {
- self.one_of_desc = ::std::option::Option::None;
- }
-
- pub fn has_desc(&self) -> bool {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(_)) = self.one_of_desc {
- } else {
- self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(::std::string::String::new()));
- }
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- if self.has_desc() {
- match self.one_of_desc.take() {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string thumbnail = 4;
-
-
- pub fn get_thumbnail(&self) -> &str {
- match self.one_of_thumbnail {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_thumbnail(&mut self) {
- self.one_of_thumbnail = ::std::option::Option::None;
- }
-
- pub fn has_thumbnail(&self) -> bool {
- match self.one_of_thumbnail {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_thumbnail(&mut self, v: ::std::string::String) {
- self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail {
- } else {
- self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(::std::string::String::new()));
- }
- match self.one_of_thumbnail {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_thumbnail(&mut self) -> ::std::string::String {
- if self.has_thumbnail() {
- match self.one_of_thumbnail.take() {
- ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for UpdateViewParams {
- 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.view_id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(is.read_string()?));
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(is.read_string()?));
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(is.read_string()?));
- },
- _ => {
- ::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.view_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.view_id);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateViewParams_oneof_one_of_name::name(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateViewParams_oneof_one_of_desc::desc(ref v) => {
- my_size += ::protobuf::rt::string_size(3, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
- match v {
- &UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v) => {
- my_size += ::protobuf::rt::string_size(4, &v);
- },
- };
- }
- 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.view_id.is_empty() {
- os.write_string(1, &self.view_id)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateViewParams_oneof_one_of_name::name(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateViewParams_oneof_one_of_desc::desc(ref v) => {
- os.write_string(3, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
- match v {
- &UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v) => {
- os.write_string(4, v)?;
- },
- };
- }
- 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() -> UpdateViewParams {
- UpdateViewParams::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>(
- "view_id",
- |m: &UpdateViewParams| { &m.view_id },
- |m: &mut UpdateViewParams| { &mut m.view_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "name",
- UpdateViewParams::has_name,
- UpdateViewParams::get_name,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "desc",
- UpdateViewParams::has_desc,
- UpdateViewParams::get_desc,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "thumbnail",
- UpdateViewParams::has_thumbnail,
- UpdateViewParams::get_thumbnail,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateViewParams>(
- "UpdateViewParams",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UpdateViewParams {
- static instance: ::protobuf::rt::LazyV2<UpdateViewParams> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UpdateViewParams::new)
- }
-}
-
-impl ::protobuf::Clear for UpdateViewParams {
- fn clear(&mut self) {
- self.view_id.clear();
- self.one_of_name = ::std::option::Option::None;
- self.one_of_desc = ::std::option::Option::None;
- self.one_of_thumbnail = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UpdateViewParams {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UpdateViewParams {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct MoveFolderItemPayload {
- // message fields
- pub item_id: ::std::string::String,
- pub from: i32,
- pub to: i32,
- pub ty: MoveFolderItemType,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a MoveFolderItemPayload {
- fn default() -> &'a MoveFolderItemPayload {
- <MoveFolderItemPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl MoveFolderItemPayload {
- pub fn new() -> MoveFolderItemPayload {
- ::std::default::Default::default()
- }
-
- // string item_id = 1;
-
-
- pub fn get_item_id(&self) -> &str {
- &self.item_id
- }
- pub fn clear_item_id(&mut self) {
- self.item_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_item_id(&mut self, v: ::std::string::String) {
- self.item_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_item_id(&mut self) -> &mut ::std::string::String {
- &mut self.item_id
- }
-
- // Take field
- pub fn take_item_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.item_id, ::std::string::String::new())
- }
-
- // int32 from = 2;
-
-
- pub fn get_from(&self) -> i32 {
- self.from
- }
- pub fn clear_from(&mut self) {
- self.from = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_from(&mut self, v: i32) {
- self.from = v;
- }
-
- // int32 to = 3;
-
-
- pub fn get_to(&self) -> i32 {
- self.to
- }
- pub fn clear_to(&mut self) {
- self.to = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_to(&mut self, v: i32) {
- self.to = v;
- }
-
- // .MoveFolderItemType ty = 4;
-
-
- pub fn get_ty(&self) -> MoveFolderItemType {
- self.ty
- }
- pub fn clear_ty(&mut self) {
- self.ty = MoveFolderItemType::MoveApp;
- }
-
- // Param is passed by value, moved
- pub fn set_ty(&mut self, v: MoveFolderItemType) {
- self.ty = v;
- }
-}
-
-impl ::protobuf::Message for MoveFolderItemPayload {
- 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.item_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_int32()?;
- self.from = tmp;
- },
- 3 => {
- 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.to = tmp;
- },
- 4 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 4, &mut self.unknown_fields)?
- },
- _ => {
- ::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.item_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.item_id);
- }
- if self.from != 0 {
- my_size += ::protobuf::rt::value_size(2, self.from, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.to != 0 {
- my_size += ::protobuf::rt::value_size(3, self.to, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.ty != MoveFolderItemType::MoveApp {
- my_size += ::protobuf::rt::enum_size(4, self.ty);
- }
- 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.item_id.is_empty() {
- os.write_string(1, &self.item_id)?;
- }
- if self.from != 0 {
- os.write_int32(2, self.from)?;
- }
- if self.to != 0 {
- os.write_int32(3, self.to)?;
- }
- if self.ty != MoveFolderItemType::MoveApp {
- os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.ty))?;
- }
- 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() -> MoveFolderItemPayload {
- MoveFolderItemPayload::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>(
- "item_id",
- |m: &MoveFolderItemPayload| { &m.item_id },
- |m: &mut MoveFolderItemPayload| { &mut m.item_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "from",
- |m: &MoveFolderItemPayload| { &m.from },
- |m: &mut MoveFolderItemPayload| { &mut m.from },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "to",
- |m: &MoveFolderItemPayload| { &m.to },
- |m: &mut MoveFolderItemPayload| { &mut m.to },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<MoveFolderItemType>>(
- "ty",
- |m: &MoveFolderItemPayload| { &m.ty },
- |m: &mut MoveFolderItemPayload| { &mut m.ty },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<MoveFolderItemPayload>(
- "MoveFolderItemPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static MoveFolderItemPayload {
- static instance: ::protobuf::rt::LazyV2<MoveFolderItemPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(MoveFolderItemPayload::new)
- }
-}
-
-impl ::protobuf::Clear for MoveFolderItemPayload {
- fn clear(&mut self) {
- self.item_id.clear();
- self.from = 0;
- self.to = 0;
- self.ty = MoveFolderItemType::MoveApp;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for MoveFolderItemPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for MoveFolderItemPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum ViewDataType {
- TextBlock = 0,
- Grid = 1,
-}
-
-impl ::protobuf::ProtobufEnum for ViewDataType {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<ViewDataType> {
- match value {
- 0 => ::std::option::Option::Some(ViewDataType::TextBlock),
- 1 => ::std::option::Option::Some(ViewDataType::Grid),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [ViewDataType] = &[
- ViewDataType::TextBlock,
- ViewDataType::Grid,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<ViewDataType>("ViewDataType", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for ViewDataType {
-}
-
-impl ::std::default::Default for ViewDataType {
- fn default() -> Self {
- ViewDataType::TextBlock
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewDataType {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum MoveFolderItemType {
- MoveApp = 0,
- MoveView = 1,
-}
-
-impl ::protobuf::ProtobufEnum for MoveFolderItemType {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<MoveFolderItemType> {
- match value {
- 0 => ::std::option::Option::Some(MoveFolderItemType::MoveApp),
- 1 => ::std::option::Option::Some(MoveFolderItemType::MoveView),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [MoveFolderItemType] = &[
- MoveFolderItemType::MoveApp,
- MoveFolderItemType::MoveView,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<MoveFolderItemType>("MoveFolderItemType", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for MoveFolderItemType {
-}
-
-impl ::std::default::Default for MoveFolderItemType {
- fn default() -> Self {
- MoveFolderItemType::MoveApp
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for MoveFolderItemType {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\nview.proto\"\xdf\x01\n\x04View\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\
- \x02id\x12\x20\n\x0cbelong_to_id\x18\x02\x20\x01(\tR\nbelongToId\x12\x12\
- \n\x04name\x18\x03\x20\x01(\tR\x04name\x12*\n\tdata_type\x18\x04\x20\x01\
- (\x0e2\r.ViewDataTypeR\x08dataType\x12#\n\rmodified_time\x18\x05\x20\x01\
- (\x03R\x0cmodifiedTime\x12\x1f\n\x0bcreate_time\x18\x06\x20\x01(\x03R\nc\
- reateTime\x12\x1f\n\x0bplugin_type\x18\x07\x20\x01(\x05R\npluginType\"+\
- \n\x0cRepeatedView\x12\x1b\n\x05items\x18\x01\x20\x03(\x0b2\x05.ViewR\
- \x05items\"&\n\x0eRepeatedViewId\x12\x14\n\x05items\x18\x01\x20\x03(\tR\
- \x05items\"\xf2\x01\n\x11CreateViewPayload\x12\x20\n\x0cbelong_to_id\x18\
- \x01\x20\x01(\tR\nbelongToId\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04na\
- me\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12\x1e\n\tthumbnail\
- \x18\x04\x20\x01(\tH\0R\tthumbnail\x12*\n\tdata_type\x18\x05\x20\x01(\
- \x0e2\r.ViewDataTypeR\x08dataType\x12\x1f\n\x0bplugin_type\x18\x06\x20\
- \x01(\x05R\npluginType\x12\x12\n\x04data\x18\x07\x20\x01(\x0cR\x04dataB\
- \x12\n\x10one_of_thumbnail\"\xf4\x01\n\x10CreateViewParams\x12\x20\n\x0c\
- belong_to_id\x18\x01\x20\x01(\tR\nbelongToId\x12\x12\n\x04name\x18\x02\
- \x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12\
- \x1c\n\tthumbnail\x18\x04\x20\x01(\tR\tthumbnail\x12*\n\tdata_type\x18\
- \x05\x20\x01(\x0e2\r.ViewDataTypeR\x08dataType\x12\x17\n\x07view_id\x18\
- \x06\x20\x01(\tR\x06viewId\x12\x12\n\x04data\x18\x07\x20\x01(\x0cR\x04da\
- ta\x12\x1f\n\x0bplugin_type\x18\x08\x20\x01(\x05R\npluginType\"\x1e\n\
- \x06ViewId\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\"\xaa\x01\n\
- \x11UpdateViewPayload\x12\x17\n\x07view_id\x18\x01\x20\x01(\tR\x06viewId\
- \x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x14\n\x04desc\x18\
- \x03\x20\x01(\tH\x01R\x04desc\x12\x1e\n\tthumbnail\x18\x04\x20\x01(\tH\
- \x02R\tthumbnailB\r\n\x0bone_of_nameB\r\n\x0bone_of_descB\x12\n\x10one_o\
- f_thumbnail\"\xa9\x01\n\x10UpdateViewParams\x12\x17\n\x07view_id\x18\x01\
- \x20\x01(\tR\x06viewId\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\
- \x12\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04desc\x12\x1e\n\tthumbnail\
- \x18\x04\x20\x01(\tH\x02R\tthumbnailB\r\n\x0bone_of_nameB\r\n\x0bone_of_\
- descB\x12\n\x10one_of_thumbnail\"y\n\x15MoveFolderItemPayload\x12\x17\n\
- \x07item_id\x18\x01\x20\x01(\tR\x06itemId\x12\x12\n\x04from\x18\x02\x20\
- \x01(\x05R\x04from\x12\x0e\n\x02to\x18\x03\x20\x01(\x05R\x02to\x12#\n\
- \x02ty\x18\x04\x20\x01(\x0e2\x13.MoveFolderItemTypeR\x02ty*'\n\x0cViewDa\
- taType\x12\r\n\tTextBlock\x10\0\x12\x08\n\x04Grid\x10\x01*/\n\x12MoveFol\
- derItemType\x12\x0b\n\x07MoveApp\x10\0\x12\x0c\n\x08MoveView\x10\x01b\
- \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()
- })
-}
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/view_info.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/view_info.rs
deleted file mode 100644
index d0c9137718..0000000000
--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/view_info.rs
+++ /dev/null
@@ -1,461 +0,0 @@
-// 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 `view_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 ViewInfo {
- // message fields
- pub id: ::std::string::String,
- pub belong_to_id: ::std::string::String,
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- pub data_type: super::view::ViewDataType,
- pub belongings: ::protobuf::SingularPtrField<super::view::RepeatedView>,
- pub ext_data: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ViewInfo {
- fn default() -> &'a ViewInfo {
- <ViewInfo as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ViewInfo {
- pub fn new() -> ViewInfo {
- ::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())
- }
-
- // string belong_to_id = 2;
-
-
- pub fn get_belong_to_id(&self) -> &str {
- &self.belong_to_id
- }
- pub fn clear_belong_to_id(&mut self) {
- self.belong_to_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_belong_to_id(&mut self, v: ::std::string::String) {
- self.belong_to_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_belong_to_id(&mut self) -> &mut ::std::string::String {
- &mut self.belong_to_id
- }
-
- // Take field
- pub fn take_belong_to_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.belong_to_id, ::std::string::String::new())
- }
-
- // string name = 3;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 4;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-
- // .ViewDataType data_type = 5;
-
-
- pub fn get_data_type(&self) -> super::view::ViewDataType {
- self.data_type
- }
- pub fn clear_data_type(&mut self) {
- self.data_type = super::view::ViewDataType::TextBlock;
- }
-
- // Param is passed by value, moved
- pub fn set_data_type(&mut self, v: super::view::ViewDataType) {
- self.data_type = v;
- }
-
- // .RepeatedView belongings = 6;
-
-
- pub fn get_belongings(&self) -> &super::view::RepeatedView {
- self.belongings.as_ref().unwrap_or_else(|| <super::view::RepeatedView as ::protobuf::Message>::default_instance())
- }
- pub fn clear_belongings(&mut self) {
- self.belongings.clear();
- }
-
- pub fn has_belongings(&self) -> bool {
- self.belongings.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_belongings(&mut self, v: super::view::RepeatedView) {
- self.belongings = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_belongings(&mut self) -> &mut super::view::RepeatedView {
- if self.belongings.is_none() {
- self.belongings.set_default();
- }
- self.belongings.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_belongings(&mut self) -> super::view::RepeatedView {
- self.belongings.take().unwrap_or_else(|| super::view::RepeatedView::new())
- }
-
- // string ext_data = 7;
-
-
- pub fn get_ext_data(&self) -> &str {
- &self.ext_data
- }
- pub fn clear_ext_data(&mut self) {
- self.ext_data.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_ext_data(&mut self, v: ::std::string::String) {
- self.ext_data = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_ext_data(&mut self) -> &mut ::std::string::String {
- &mut self.ext_data
- }
-
- // Take field
- pub fn take_ext_data(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.ext_data, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for ViewInfo {
- fn is_initialized(&self) -> bool {
- for v in &self.belongings {
- 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_proto3_string_into(wire_type, is, &mut self.belong_to_id)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- 5 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.data_type, 5, &mut self.unknown_fields)?
- },
- 6 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.belongings)?;
- },
- 7 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ext_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.id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.id);
- }
- if !self.belong_to_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.belong_to_id);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.desc);
- }
- if self.data_type != super::view::ViewDataType::TextBlock {
- my_size += ::protobuf::rt::enum_size(5, self.data_type);
- }
- if let Some(ref v) = self.belongings.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if !self.ext_data.is_empty() {
- my_size += ::protobuf::rt::string_size(7, &self.ext_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.id.is_empty() {
- os.write_string(1, &self.id)?;
- }
- if !self.belong_to_id.is_empty() {
- os.write_string(2, &self.belong_to_id)?;
- }
- if !self.name.is_empty() {
- os.write_string(3, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(4, &self.desc)?;
- }
- if self.data_type != super::view::ViewDataType::TextBlock {
- os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.data_type))?;
- }
- if let Some(ref v) = self.belongings.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.ext_data.is_empty() {
- os.write_string(7, &self.ext_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) -> &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() -> ViewInfo {
- ViewInfo::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: &ViewInfo| { &m.id },
- |m: &mut ViewInfo| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "belong_to_id",
- |m: &ViewInfo| { &m.belong_to_id },
- |m: &mut ViewInfo| { &mut m.belong_to_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &ViewInfo| { &m.name },
- |m: &mut ViewInfo| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &ViewInfo| { &m.desc },
- |m: &mut ViewInfo| { &mut m.desc },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::view::ViewDataType>>(
- "data_type",
- |m: &ViewInfo| { &m.data_type },
- |m: &mut ViewInfo| { &mut m.data_type },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::view::RepeatedView>>(
- "belongings",
- |m: &ViewInfo| { &m.belongings },
- |m: &mut ViewInfo| { &mut m.belongings },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "ext_data",
- |m: &ViewInfo| { &m.ext_data },
- |m: &mut ViewInfo| { &mut m.ext_data },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewInfo>(
- "ViewInfo",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ViewInfo {
- static instance: ::protobuf::rt::LazyV2<ViewInfo> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewInfo::new)
- }
-}
-
-impl ::protobuf::Clear for ViewInfo {
- fn clear(&mut self) {
- self.id.clear();
- self.belong_to_id.clear();
- self.name.clear();
- self.desc.clear();
- self.data_type = super::view::ViewDataType::TextBlock;
- self.belongings.clear();
- self.ext_data.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ViewInfo {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewInfo {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0fview_info.proto\x1a\nview.proto\"\xda\x01\n\x08ViewInfo\x12\x0e\n\
- \x02id\x18\x01\x20\x01(\tR\x02id\x12\x20\n\x0cbelong_to_id\x18\x02\x20\
- \x01(\tR\nbelongToId\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\
- \x12\n\x04desc\x18\x04\x20\x01(\tR\x04desc\x12*\n\tdata_type\x18\x05\x20\
- \x01(\x0e2\r.ViewDataTypeR\x08dataType\x12-\n\nbelongings\x18\x06\x20\
- \x01(\x0b2\r.RepeatedViewR\nbelongings\x12\x19\n\x08ext_data\x18\x07\x20\
- \x01(\tR\x07extDatab\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()
- })
-}
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/workspace.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/workspace.rs
deleted file mode 100644
index aa2358481b..0000000000
--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/workspace.rs
+++ /dev/null
@@ -1,2104 +0,0 @@
-// 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 `workspace.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 Workspace {
- // message fields
- pub id: ::std::string::String,
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- pub apps: ::protobuf::SingularPtrField<super::app::RepeatedApp>,
- pub modified_time: i64,
- pub create_time: i64,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a Workspace {
- fn default() -> &'a Workspace {
- <Workspace as ::protobuf::Message>::default_instance()
- }
-}
-
-impl Workspace {
- pub fn new() -> Workspace {
- ::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())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-
- // .RepeatedApp apps = 4;
-
-
- pub fn get_apps(&self) -> &super::app::RepeatedApp {
- self.apps.as_ref().unwrap_or_else(|| <super::app::RepeatedApp as ::protobuf::Message>::default_instance())
- }
- pub fn clear_apps(&mut self) {
- self.apps.clear();
- }
-
- pub fn has_apps(&self) -> bool {
- self.apps.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_apps(&mut self, v: super::app::RepeatedApp) {
- self.apps = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_apps(&mut self) -> &mut super::app::RepeatedApp {
- if self.apps.is_none() {
- self.apps.set_default();
- }
- self.apps.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_apps(&mut self) -> super::app::RepeatedApp {
- self.apps.take().unwrap_or_else(|| super::app::RepeatedApp::new())
- }
-
- // int64 modified_time = 5;
-
-
- pub fn get_modified_time(&self) -> i64 {
- self.modified_time
- }
- pub fn clear_modified_time(&mut self) {
- self.modified_time = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_modified_time(&mut self, v: i64) {
- self.modified_time = v;
- }
-
- // int64 create_time = 6;
-
-
- pub fn get_create_time(&self) -> i64 {
- self.create_time
- }
- pub fn clear_create_time(&mut self) {
- self.create_time = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_create_time(&mut self, v: i64) {
- self.create_time = v;
- }
-}
-
-impl ::protobuf::Message for Workspace {
- fn is_initialized(&self) -> bool {
- for v in &self.apps {
- 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_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.apps)?;
- },
- 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.modified_time = 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.create_time = 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.id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.id);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.desc);
- }
- if let Some(ref v) = self.apps.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if self.modified_time != 0 {
- my_size += ::protobuf::rt::value_size(5, self.modified_time, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.create_time != 0 {
- my_size += ::protobuf::rt::value_size(6, self.create_time, ::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.id.is_empty() {
- os.write_string(1, &self.id)?;
- }
- if !self.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(3, &self.desc)?;
- }
- if let Some(ref v) = self.apps.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.modified_time != 0 {
- os.write_int64(5, self.modified_time)?;
- }
- if self.create_time != 0 {
- os.write_int64(6, self.create_time)?;
- }
- 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() -> Workspace {
- Workspace::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: &Workspace| { &m.id },
- |m: &mut Workspace| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &Workspace| { &m.name },
- |m: &mut Workspace| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &Workspace| { &m.desc },
- |m: &mut Workspace| { &mut m.desc },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::app::RepeatedApp>>(
- "apps",
- |m: &Workspace| { &m.apps },
- |m: &mut Workspace| { &mut m.apps },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "modified_time",
- |m: &Workspace| { &m.modified_time },
- |m: &mut Workspace| { &mut m.modified_time },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "create_time",
- |m: &Workspace| { &m.create_time },
- |m: &mut Workspace| { &mut m.create_time },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<Workspace>(
- "Workspace",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static Workspace {
- static instance: ::protobuf::rt::LazyV2<Workspace> = ::protobuf::rt::LazyV2::INIT;
- instance.get(Workspace::new)
- }
-}
-
-impl ::protobuf::Clear for Workspace {
- fn clear(&mut self) {
- self.id.clear();
- self.name.clear();
- self.desc.clear();
- self.apps.clear();
- self.modified_time = 0;
- self.create_time = 0;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for Workspace {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for Workspace {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedWorkspace {
- // message fields
- pub items: ::protobuf::RepeatedField<Workspace>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedWorkspace {
- fn default() -> &'a RepeatedWorkspace {
- <RepeatedWorkspace as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedWorkspace {
- pub fn new() -> RepeatedWorkspace {
- ::std::default::Default::default()
- }
-
- // repeated .Workspace items = 1;
-
-
- pub fn get_items(&self) -> &[Workspace] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Workspace>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Workspace> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Workspace> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedWorkspace {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- _ => {
- ::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.items {
- 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.items {
- 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) -> &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() -> RepeatedWorkspace {
- RepeatedWorkspace::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Workspace>>(
- "items",
- |m: &RepeatedWorkspace| { &m.items },
- |m: &mut RepeatedWorkspace| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedWorkspace>(
- "RepeatedWorkspace",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedWorkspace {
- static instance: ::protobuf::rt::LazyV2<RepeatedWorkspace> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedWorkspace::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedWorkspace {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedWorkspace {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedWorkspace {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct CreateWorkspacePayload {
- // message fields
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a CreateWorkspacePayload {
- fn default() -> &'a CreateWorkspacePayload {
- <CreateWorkspacePayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl CreateWorkspacePayload {
- pub fn new() -> CreateWorkspacePayload {
- ::std::default::Default::default()
- }
-
- // string name = 1;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 2;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for CreateWorkspacePayload {
- 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.name)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- _ => {
- ::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.name.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.desc);
- }
- 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.name.is_empty() {
- os.write_string(1, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(2, &self.desc)?;
- }
- 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() -> CreateWorkspacePayload {
- CreateWorkspacePayload::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>(
- "name",
- |m: &CreateWorkspacePayload| { &m.name },
- |m: &mut CreateWorkspacePayload| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &CreateWorkspacePayload| { &m.desc },
- |m: &mut CreateWorkspacePayload| { &mut m.desc },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateWorkspacePayload>(
- "CreateWorkspacePayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static CreateWorkspacePayload {
- static instance: ::protobuf::rt::LazyV2<CreateWorkspacePayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(CreateWorkspacePayload::new)
- }
-}
-
-impl ::protobuf::Clear for CreateWorkspacePayload {
- fn clear(&mut self) {
- self.name.clear();
- self.desc.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for CreateWorkspacePayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for CreateWorkspacePayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct CreateWorkspaceParams {
- // message fields
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a CreateWorkspaceParams {
- fn default() -> &'a CreateWorkspaceParams {
- <CreateWorkspaceParams as ::protobuf::Message>::default_instance()
- }
-}
-
-impl CreateWorkspaceParams {
- pub fn new() -> CreateWorkspaceParams {
- ::std::default::Default::default()
- }
-
- // string name = 1;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 2;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for CreateWorkspaceParams {
- 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.name)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- _ => {
- ::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.name.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.desc);
- }
- 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.name.is_empty() {
- os.write_string(1, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(2, &self.desc)?;
- }
- 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() -> CreateWorkspaceParams {
- CreateWorkspaceParams::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>(
- "name",
- |m: &CreateWorkspaceParams| { &m.name },
- |m: &mut CreateWorkspaceParams| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &CreateWorkspaceParams| { &m.desc },
- |m: &mut CreateWorkspaceParams| { &mut m.desc },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateWorkspaceParams>(
- "CreateWorkspaceParams",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static CreateWorkspaceParams {
- static instance: ::protobuf::rt::LazyV2<CreateWorkspaceParams> = ::protobuf::rt::LazyV2::INIT;
- instance.get(CreateWorkspaceParams::new)
- }
-}
-
-impl ::protobuf::Clear for CreateWorkspaceParams {
- fn clear(&mut self) {
- self.name.clear();
- self.desc.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for CreateWorkspaceParams {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for CreateWorkspaceParams {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct WorkspaceId {
- // message oneof groups
- pub one_of_value: ::std::option::Option<WorkspaceId_oneof_one_of_value>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a WorkspaceId {
- fn default() -> &'a WorkspaceId {
- <WorkspaceId as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum WorkspaceId_oneof_one_of_value {
- value(::std::string::String),
-}
-
-impl WorkspaceId {
- pub fn new() -> WorkspaceId {
- ::std::default::Default::default()
- }
-
- // string value = 1;
-
-
- pub fn get_value(&self) -> &str {
- match self.one_of_value {
- ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_value(&mut self) {
- self.one_of_value = ::std::option::Option::None;
- }
-
- pub fn has_value(&self) -> bool {
- match self.one_of_value {
- ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_value(&mut self, v: ::std::string::String) {
- self.one_of_value = ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_value(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(_)) = self.one_of_value {
- } else {
- self.one_of_value = ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(::std::string::String::new()));
- }
- match self.one_of_value {
- ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_value(&mut self) -> ::std::string::String {
- if self.has_value() {
- match self.one_of_value.take() {
- ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for WorkspaceId {
- 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::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_value = ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(is.read_string()?));
- },
- _ => {
- ::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.one_of_value {
- match v {
- &WorkspaceId_oneof_one_of_value::value(ref v) => {
- my_size += ::protobuf::rt::string_size(1, &v);
- },
- };
- }
- 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.one_of_value {
- match v {
- &WorkspaceId_oneof_one_of_value::value(ref v) => {
- os.write_string(1, v)?;
- },
- };
- }
- 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() -> WorkspaceId {
- WorkspaceId::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_singular_string_accessor::<_>(
- "value",
- WorkspaceId::has_value,
- WorkspaceId::get_value,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<WorkspaceId>(
- "WorkspaceId",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static WorkspaceId {
- static instance: ::protobuf::rt::LazyV2<WorkspaceId> = ::protobuf::rt::LazyV2::INIT;
- instance.get(WorkspaceId::new)
- }
-}
-
-impl ::protobuf::Clear for WorkspaceId {
- fn clear(&mut self) {
- self.one_of_value = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for WorkspaceId {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for WorkspaceId {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct CurrentWorkspaceSetting {
- // message fields
- pub workspace: ::protobuf::SingularPtrField<Workspace>,
- // message oneof groups
- pub one_of_latest_view: ::std::option::Option<CurrentWorkspaceSetting_oneof_one_of_latest_view>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a CurrentWorkspaceSetting {
- fn default() -> &'a CurrentWorkspaceSetting {
- <CurrentWorkspaceSetting as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum CurrentWorkspaceSetting_oneof_one_of_latest_view {
- latest_view(super::view::View),
-}
-
-impl CurrentWorkspaceSetting {
- pub fn new() -> CurrentWorkspaceSetting {
- ::std::default::Default::default()
- }
-
- // .Workspace workspace = 1;
-
-
- pub fn get_workspace(&self) -> &Workspace {
- self.workspace.as_ref().unwrap_or_else(|| <Workspace as ::protobuf::Message>::default_instance())
- }
- pub fn clear_workspace(&mut self) {
- self.workspace.clear();
- }
-
- pub fn has_workspace(&self) -> bool {
- self.workspace.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_workspace(&mut self, v: Workspace) {
- self.workspace = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_workspace(&mut self) -> &mut Workspace {
- if self.workspace.is_none() {
- self.workspace.set_default();
- }
- self.workspace.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_workspace(&mut self) -> Workspace {
- self.workspace.take().unwrap_or_else(|| Workspace::new())
- }
-
- // .View latest_view = 2;
-
-
- pub fn get_latest_view(&self) -> &super::view::View {
- match self.one_of_latest_view {
- ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref v)) => v,
- _ => <super::view::View as ::protobuf::Message>::default_instance(),
- }
- }
- pub fn clear_latest_view(&mut self) {
- self.one_of_latest_view = ::std::option::Option::None;
- }
-
- pub fn has_latest_view(&self) -> bool {
- match self.one_of_latest_view {
- ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_latest_view(&mut self, v: super::view::View) {
- self.one_of_latest_view = ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_latest_view(&mut self) -> &mut super::view::View {
- if let ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(_)) = self.one_of_latest_view {
- } else {
- self.one_of_latest_view = ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(super::view::View::new()));
- }
- match self.one_of_latest_view {
- ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_latest_view(&mut self) -> super::view::View {
- if self.has_latest_view() {
- match self.one_of_latest_view.take() {
- ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(v)) => v,
- _ => panic!(),
- }
- } else {
- super::view::View::new()
- }
- }
-}
-
-impl ::protobuf::Message for CurrentWorkspaceSetting {
- fn is_initialized(&self) -> bool {
- for v in &self.workspace {
- if !v.is_initialized() {
- return false;
- }
- };
- if let Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref v)) = self.one_of_latest_view {
- 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.workspace)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_latest_view = ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(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 Some(ref v) = self.workspace.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_latest_view {
- match v {
- &CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(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 Some(ref v) = self.workspace.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 ::std::option::Option::Some(ref v) = self.one_of_latest_view {
- match v {
- &CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(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)?;
- },
- };
- }
- 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() -> CurrentWorkspaceSetting {
- CurrentWorkspaceSetting::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Workspace>>(
- "workspace",
- |m: &CurrentWorkspaceSetting| { &m.workspace },
- |m: &mut CurrentWorkspaceSetting| { &mut m.workspace },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, super::view::View>(
- "latest_view",
- CurrentWorkspaceSetting::has_latest_view,
- CurrentWorkspaceSetting::get_latest_view,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<CurrentWorkspaceSetting>(
- "CurrentWorkspaceSetting",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static CurrentWorkspaceSetting {
- static instance: ::protobuf::rt::LazyV2<CurrentWorkspaceSetting> = ::protobuf::rt::LazyV2::INIT;
- instance.get(CurrentWorkspaceSetting::new)
- }
-}
-
-impl ::protobuf::Clear for CurrentWorkspaceSetting {
- fn clear(&mut self) {
- self.workspace.clear();
- self.one_of_latest_view = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for CurrentWorkspaceSetting {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for CurrentWorkspaceSetting {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UpdateWorkspaceRequest {
- // message fields
- pub id: ::std::string::String,
- // message oneof groups
- pub one_of_name: ::std::option::Option<UpdateWorkspaceRequest_oneof_one_of_name>,
- pub one_of_desc: ::std::option::Option<UpdateWorkspaceRequest_oneof_one_of_desc>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UpdateWorkspaceRequest {
- fn default() -> &'a UpdateWorkspaceRequest {
- <UpdateWorkspaceRequest as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateWorkspaceRequest_oneof_one_of_name {
- name(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateWorkspaceRequest_oneof_one_of_desc {
- desc(::std::string::String),
-}
-
-impl UpdateWorkspaceRequest {
- pub fn new() -> UpdateWorkspaceRequest {
- ::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())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_name(&mut self) {
- self.one_of_name = ::std::option::Option::None;
- }
-
- pub fn has_name(&self) -> bool {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(_)) = self.one_of_name {
- } else {
- self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(::std::string::String::new()));
- }
- match self.one_of_name {
- ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- if self.has_name() {
- match self.one_of_name.take() {
- ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_desc(&mut self) {
- self.one_of_desc = ::std::option::Option::None;
- }
-
- pub fn has_desc(&self) -> bool {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(_)) = self.one_of_desc {
- } else {
- self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(::std::string::String::new()));
- }
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- if self.has_desc() {
- match self.one_of_desc.take() {
- ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for UpdateWorkspaceRequest {
- 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.id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(is.read_string()?));
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(is.read_string()?));
- },
- _ => {
- ::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 ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateWorkspaceRequest_oneof_one_of_name::name(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref v) => {
- my_size += ::protobuf::rt::string_size(3, &v);
- },
- };
- }
- 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 ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateWorkspaceRequest_oneof_one_of_name::name(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref v) => {
- os.write_string(3, v)?;
- },
- };
- }
- 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() -> UpdateWorkspaceRequest {
- UpdateWorkspaceRequest::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: &UpdateWorkspaceRequest| { &m.id },
- |m: &mut UpdateWorkspaceRequest| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "name",
- UpdateWorkspaceRequest::has_name,
- UpdateWorkspaceRequest::get_name,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "desc",
- UpdateWorkspaceRequest::has_desc,
- UpdateWorkspaceRequest::get_desc,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateWorkspaceRequest>(
- "UpdateWorkspaceRequest",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UpdateWorkspaceRequest {
- static instance: ::protobuf::rt::LazyV2<UpdateWorkspaceRequest> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UpdateWorkspaceRequest::new)
- }
-}
-
-impl ::protobuf::Clear for UpdateWorkspaceRequest {
- fn clear(&mut self) {
- self.id.clear();
- self.one_of_name = ::std::option::Option::None;
- self.one_of_desc = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UpdateWorkspaceRequest {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UpdateWorkspaceRequest {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UpdateWorkspaceParams {
- // message fields
- pub id: ::std::string::String,
- // message oneof groups
- pub one_of_name: ::std::option::Option<UpdateWorkspaceParams_oneof_one_of_name>,
- pub one_of_desc: ::std::option::Option<UpdateWorkspaceParams_oneof_one_of_desc>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UpdateWorkspaceParams {
- fn default() -> &'a UpdateWorkspaceParams {
- <UpdateWorkspaceParams as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateWorkspaceParams_oneof_one_of_name {
- name(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateWorkspaceParams_oneof_one_of_desc {
- desc(::std::string::String),
-}
-
-impl UpdateWorkspaceParams {
- pub fn new() -> UpdateWorkspaceParams {
- ::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())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_name(&mut self) {
- self.one_of_name = ::std::option::Option::None;
- }
-
- pub fn has_name(&self) -> bool {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(_)) = self.one_of_name {
- } else {
- self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(::std::string::String::new()));
- }
- match self.one_of_name {
- ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- if self.has_name() {
- match self.one_of_name.take() {
- ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_desc(&mut self) {
- self.one_of_desc = ::std::option::Option::None;
- }
-
- pub fn has_desc(&self) -> bool {
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(_)) = self.one_of_desc {
- } else {
- self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(::std::string::String::new()));
- }
- match self.one_of_desc {
- ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- if self.has_desc() {
- match self.one_of_desc.take() {
- ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for UpdateWorkspaceParams {
- 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.id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(is.read_string()?));
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(is.read_string()?));
- },
- _ => {
- ::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 ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateWorkspaceParams_oneof_one_of_name::name(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateWorkspaceParams_oneof_one_of_desc::desc(ref v) => {
- my_size += ::protobuf::rt::string_size(3, &v);
- },
- };
- }
- 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 ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateWorkspaceParams_oneof_one_of_name::name(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &UpdateWorkspaceParams_oneof_one_of_desc::desc(ref v) => {
- os.write_string(3, v)?;
- },
- };
- }
- 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() -> UpdateWorkspaceParams {
- UpdateWorkspaceParams::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: &UpdateWorkspaceParams| { &m.id },
- |m: &mut UpdateWorkspaceParams| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "name",
- UpdateWorkspaceParams::has_name,
- UpdateWorkspaceParams::get_name,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "desc",
- UpdateWorkspaceParams::has_desc,
- UpdateWorkspaceParams::get_desc,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateWorkspaceParams>(
- "UpdateWorkspaceParams",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UpdateWorkspaceParams {
- static instance: ::protobuf::rt::LazyV2<UpdateWorkspaceParams> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UpdateWorkspaceParams::new)
- }
-}
-
-impl ::protobuf::Clear for UpdateWorkspaceParams {
- fn clear(&mut self) {
- self.id.clear();
- self.one_of_name = ::std::option::Option::None;
- self.one_of_desc = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UpdateWorkspaceParams {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UpdateWorkspaceParams {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0fworkspace.proto\x1a\tapp.proto\x1a\nview.proto\"\xab\x01\n\tWorksp\
- ace\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x12\n\x04name\x18\x02\
- \x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12\
- \x20\n\x04apps\x18\x04\x20\x01(\x0b2\x0c.RepeatedAppR\x04apps\x12#\n\rmo\
- dified_time\x18\x05\x20\x01(\x03R\x0cmodifiedTime\x12\x1f\n\x0bcreate_ti\
- me\x18\x06\x20\x01(\x03R\ncreateTime\"5\n\x11RepeatedWorkspace\x12\x20\n\
- \x05items\x18\x01\x20\x03(\x0b2\n.WorkspaceR\x05items\"@\n\x16CreateWork\
- spacePayload\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04\
- desc\x18\x02\x20\x01(\tR\x04desc\"?\n\x15CreateWorkspaceParams\x12\x12\n\
- \x04name\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x02\x20\x01(\
- \tR\x04desc\"5\n\x0bWorkspaceId\x12\x16\n\x05value\x18\x01\x20\x01(\tH\0\
- R\x05valueB\x0e\n\x0cone_of_value\"\x83\x01\n\x17CurrentWorkspaceSetting\
- \x12(\n\tworkspace\x18\x01\x20\x01(\x0b2\n.WorkspaceR\tworkspace\x12(\n\
- \x0blatest_view\x18\x02\x20\x01(\x0b2\x05.ViewH\0R\nlatestViewB\x14\n\
- \x12one_of_latest_view\"r\n\x16UpdateWorkspaceRequest\x12\x0e\n\x02id\
- \x18\x01\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04n\
- ame\x12\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04descB\r\n\x0bone_of_na\
- meB\r\n\x0bone_of_desc\"q\n\x15UpdateWorkspaceParams\x12\x0e\n\x02id\x18\
- \x01\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\
- \x12\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04descB\r\n\x0bone_of_nameB\
- \r\n\x0bone_of_descb\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()
- })
-}
diff --git a/shared-lib/flowy-grid-data-model/src/protobuf/mod.rs b/shared-lib/flowy-grid-data-model/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/shared-lib/flowy-grid-data-model/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/shared-lib/flowy-grid-data-model/src/protobuf/model/field.rs b/shared-lib/flowy-grid-data-model/src/protobuf/model/field.rs
deleted file mode 100644
index 405806d171..0000000000
--- a/shared-lib/flowy-grid-data-model/src/protobuf/model/field.rs
+++ /dev/null
@@ -1,4104 +0,0 @@
-// 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 `field.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 Field {
- // message fields
- pub id: ::std::string::String,
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- pub field_type: FieldType,
- pub frozen: bool,
- pub visibility: bool,
- pub width: i32,
- pub is_primary: bool,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a Field {
- fn default() -> &'a Field {
- <Field as ::protobuf::Message>::default_instance()
- }
-}
-
-impl Field {
- pub fn new() -> Field {
- ::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())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 3;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-
- // .FieldType field_type = 4;
-
-
- pub fn get_field_type(&self) -> FieldType {
- self.field_type
- }
- pub fn clear_field_type(&mut self) {
- self.field_type = FieldType::RichText;
- }
-
- // Param is passed by value, moved
- pub fn set_field_type(&mut self, v: FieldType) {
- self.field_type = v;
- }
-
- // bool frozen = 5;
-
-
- pub fn get_frozen(&self) -> bool {
- self.frozen
- }
- pub fn clear_frozen(&mut self) {
- self.frozen = false;
- }
-
- // Param is passed by value, moved
- pub fn set_frozen(&mut self, v: bool) {
- self.frozen = v;
- }
-
- // bool visibility = 6;
-
-
- pub fn get_visibility(&self) -> bool {
- self.visibility
- }
- pub fn clear_visibility(&mut self) {
- self.visibility = false;
- }
-
- // Param is passed by value, moved
- pub fn set_visibility(&mut self, v: bool) {
- self.visibility = v;
- }
-
- // int32 width = 7;
-
-
- pub fn get_width(&self) -> i32 {
- self.width
- }
- pub fn clear_width(&mut self) {
- self.width = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_width(&mut self, v: i32) {
- self.width = v;
- }
-
- // bool is_primary = 8;
-
-
- pub fn get_is_primary(&self) -> bool {
- self.is_primary
- }
- pub fn clear_is_primary(&mut self) {
- self.is_primary = false;
- }
-
- // Param is passed by value, moved
- pub fn set_is_primary(&mut self, v: bool) {
- self.is_primary = v;
- }
-}
-
-impl ::protobuf::Message for Field {
- 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.id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- 4 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 4, &mut self.unknown_fields)?
- },
- 5 => {
- 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.frozen = 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_bool()?;
- self.visibility = tmp;
- },
- 7 => {
- 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.width = tmp;
- },
- 8 => {
- 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.is_primary = 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.id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.id);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.desc);
- }
- if self.field_type != FieldType::RichText {
- my_size += ::protobuf::rt::enum_size(4, self.field_type);
- }
- if self.frozen != false {
- my_size += 2;
- }
- if self.visibility != false {
- my_size += 2;
- }
- if self.width != 0 {
- my_size += ::protobuf::rt::value_size(7, self.width, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.is_primary != 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.id.is_empty() {
- os.write_string(1, &self.id)?;
- }
- if !self.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(3, &self.desc)?;
- }
- if self.field_type != FieldType::RichText {
- os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.field_type))?;
- }
- if self.frozen != false {
- os.write_bool(5, self.frozen)?;
- }
- if self.visibility != false {
- os.write_bool(6, self.visibility)?;
- }
- if self.width != 0 {
- os.write_int32(7, self.width)?;
- }
- if self.is_primary != false {
- os.write_bool(8, self.is_primary)?;
- }
- 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() -> Field {
- Field::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: &Field| { &m.id },
- |m: &mut Field| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &Field| { &m.name },
- |m: &mut Field| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &Field| { &m.desc },
- |m: &mut Field| { &mut m.desc },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<FieldType>>(
- "field_type",
- |m: &Field| { &m.field_type },
- |m: &mut Field| { &mut m.field_type },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "frozen",
- |m: &Field| { &m.frozen },
- |m: &mut Field| { &mut m.frozen },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "visibility",
- |m: &Field| { &m.visibility },
- |m: &mut Field| { &mut m.visibility },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "width",
- |m: &Field| { &m.width },
- |m: &mut Field| { &mut m.width },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "is_primary",
- |m: &Field| { &m.is_primary },
- |m: &mut Field| { &mut m.is_primary },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<Field>(
- "Field",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static Field {
- static instance: ::protobuf::rt::LazyV2<Field> = ::protobuf::rt::LazyV2::INIT;
- instance.get(Field::new)
- }
-}
-
-impl ::protobuf::Clear for Field {
- fn clear(&mut self) {
- self.id.clear();
- self.name.clear();
- self.desc.clear();
- self.field_type = FieldType::RichText;
- self.frozen = false;
- self.visibility = false;
- self.width = 0;
- self.is_primary = false;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for Field {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for Field {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct FieldOrder {
- // message fields
- pub field_id: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a FieldOrder {
- fn default() -> &'a FieldOrder {
- <FieldOrder as ::protobuf::Message>::default_instance()
- }
-}
-
-impl FieldOrder {
- pub fn new() -> FieldOrder {
- ::std::default::Default::default()
- }
-
- // string field_id = 1;
-
-
- pub fn get_field_id(&self) -> &str {
- &self.field_id
- }
- pub fn clear_field_id(&mut self) {
- self.field_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.field_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- &mut self.field_id
- }
-
- // Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for FieldOrder {
- 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_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.field_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.field_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.field_id.is_empty() {
- os.write_string(1, &self.field_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() -> FieldOrder {
- FieldOrder::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>(
- "field_id",
- |m: &FieldOrder| { &m.field_id },
- |m: &mut FieldOrder| { &mut m.field_id },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldOrder>(
- "FieldOrder",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static FieldOrder {
- static instance: ::protobuf::rt::LazyV2<FieldOrder> = ::protobuf::rt::LazyV2::INIT;
- instance.get(FieldOrder::new)
- }
-}
-
-impl ::protobuf::Clear for FieldOrder {
- fn clear(&mut self) {
- self.field_id.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for FieldOrder {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FieldOrder {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct GridFieldChangeset {
- // message fields
- pub grid_id: ::std::string::String,
- pub inserted_fields: ::protobuf::RepeatedField<IndexField>,
- pub deleted_fields: ::protobuf::RepeatedField<FieldOrder>,
- pub updated_fields: ::protobuf::RepeatedField<Field>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a GridFieldChangeset {
- fn default() -> &'a GridFieldChangeset {
- <GridFieldChangeset as ::protobuf::Message>::default_instance()
- }
-}
-
-impl GridFieldChangeset {
- pub fn new() -> GridFieldChangeset {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // repeated .IndexField inserted_fields = 2;
-
-
- pub fn get_inserted_fields(&self) -> &[IndexField] {
- &self.inserted_fields
- }
- pub fn clear_inserted_fields(&mut self) {
- self.inserted_fields.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_inserted_fields(&mut self, v: ::protobuf::RepeatedField<IndexField>) {
- self.inserted_fields = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_inserted_fields(&mut self) -> &mut ::protobuf::RepeatedField<IndexField> {
- &mut self.inserted_fields
- }
-
- // Take field
- pub fn take_inserted_fields(&mut self) -> ::protobuf::RepeatedField<IndexField> {
- ::std::mem::replace(&mut self.inserted_fields, ::protobuf::RepeatedField::new())
- }
-
- // repeated .FieldOrder deleted_fields = 3;
-
-
- pub fn get_deleted_fields(&self) -> &[FieldOrder] {
- &self.deleted_fields
- }
- pub fn clear_deleted_fields(&mut self) {
- self.deleted_fields.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_deleted_fields(&mut self, v: ::protobuf::RepeatedField<FieldOrder>) {
- self.deleted_fields = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_deleted_fields(&mut self) -> &mut ::protobuf::RepeatedField<FieldOrder> {
- &mut self.deleted_fields
- }
-
- // Take field
- pub fn take_deleted_fields(&mut self) -> ::protobuf::RepeatedField<FieldOrder> {
- ::std::mem::replace(&mut self.deleted_fields, ::protobuf::RepeatedField::new())
- }
-
- // repeated .Field updated_fields = 4;
-
-
- pub fn get_updated_fields(&self) -> &[Field] {
- &self.updated_fields
- }
- pub fn clear_updated_fields(&mut self) {
- self.updated_fields.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_updated_fields(&mut self, v: ::protobuf::RepeatedField<Field>) {
- self.updated_fields = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_updated_fields(&mut self) -> &mut ::protobuf::RepeatedField<Field> {
- &mut self.updated_fields
- }
-
- // Take field
- pub fn take_updated_fields(&mut self) -> ::protobuf::RepeatedField<Field> {
- ::std::mem::replace(&mut self.updated_fields, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for GridFieldChangeset {
- fn is_initialized(&self) -> bool {
- for v in &self.inserted_fields {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.deleted_fields {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.updated_fields {
- 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.grid_id)?;
- },
- 2 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.inserted_fields)?;
- },
- 3 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.deleted_fields)?;
- },
- 4 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.updated_fields)?;
- },
- _ => {
- ::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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- for value in &self.inserted_fields {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- };
- for value in &self.deleted_fields {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- };
- for value in &self.updated_fields {
- 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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- for v in &self.inserted_fields {
- 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.deleted_fields {
- 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.updated_fields {
- 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) -> &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() -> GridFieldChangeset {
- GridFieldChangeset::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>(
- "grid_id",
- |m: &GridFieldChangeset| { &m.grid_id },
- |m: &mut GridFieldChangeset| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<IndexField>>(
- "inserted_fields",
- |m: &GridFieldChangeset| { &m.inserted_fields },
- |m: &mut GridFieldChangeset| { &mut m.inserted_fields },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FieldOrder>>(
- "deleted_fields",
- |m: &GridFieldChangeset| { &m.deleted_fields },
- |m: &mut GridFieldChangeset| { &mut m.deleted_fields },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
- "updated_fields",
- |m: &GridFieldChangeset| { &m.updated_fields },
- |m: &mut GridFieldChangeset| { &mut m.updated_fields },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridFieldChangeset>(
- "GridFieldChangeset",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static GridFieldChangeset {
- static instance: ::protobuf::rt::LazyV2<GridFieldChangeset> = ::protobuf::rt::LazyV2::INIT;
- instance.get(GridFieldChangeset::new)
- }
-}
-
-impl ::protobuf::Clear for GridFieldChangeset {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.inserted_fields.clear();
- self.deleted_fields.clear();
- self.updated_fields.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for GridFieldChangeset {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for GridFieldChangeset {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct IndexField {
- // message fields
- pub field: ::protobuf::SingularPtrField<Field>,
- pub index: i32,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a IndexField {
- fn default() -> &'a IndexField {
- <IndexField as ::protobuf::Message>::default_instance()
- }
-}
-
-impl IndexField {
- pub fn new() -> IndexField {
- ::std::default::Default::default()
- }
-
- // .Field field = 1;
-
-
- pub fn get_field(&self) -> &Field {
- self.field.as_ref().unwrap_or_else(|| <Field as ::protobuf::Message>::default_instance())
- }
- pub fn clear_field(&mut self) {
- self.field.clear();
- }
-
- pub fn has_field(&self) -> bool {
- self.field.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_field(&mut self, v: Field) {
- self.field = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field(&mut self) -> &mut Field {
- if self.field.is_none() {
- self.field.set_default();
- }
- self.field.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_field(&mut self) -> Field {
- self.field.take().unwrap_or_else(|| Field::new())
- }
-
- // int32 index = 2;
-
-
- pub fn get_index(&self) -> i32 {
- self.index
- }
- pub fn clear_index(&mut self) {
- self.index = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_index(&mut self, v: i32) {
- self.index = v;
- }
-}
-
-impl ::protobuf::Message for IndexField {
- fn is_initialized(&self) -> bool {
- for v in &self.field {
- 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.field)?;
- },
- 2 => {
- 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.index = 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.field.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if self.index != 0 {
- my_size += ::protobuf::rt::value_size(2, self.index, ::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.field.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.index != 0 {
- os.write_int32(2, self.index)?;
- }
- 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() -> IndexField {
- IndexField::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
- "field",
- |m: &IndexField| { &m.field },
- |m: &mut IndexField| { &mut m.field },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "index",
- |m: &IndexField| { &m.index },
- |m: &mut IndexField| { &mut m.index },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<IndexField>(
- "IndexField",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static IndexField {
- static instance: ::protobuf::rt::LazyV2<IndexField> = ::protobuf::rt::LazyV2::INIT;
- instance.get(IndexField::new)
- }
-}
-
-impl ::protobuf::Clear for IndexField {
- fn clear(&mut self) {
- self.field.clear();
- self.index = 0;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for IndexField {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for IndexField {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct GetEditFieldContextPayload {
- // message fields
- pub grid_id: ::std::string::String,
- pub field_type: FieldType,
- // message oneof groups
- pub one_of_field_id: ::std::option::Option<GetEditFieldContextPayload_oneof_one_of_field_id>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a GetEditFieldContextPayload {
- fn default() -> &'a GetEditFieldContextPayload {
- <GetEditFieldContextPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum GetEditFieldContextPayload_oneof_one_of_field_id {
- field_id(::std::string::String),
-}
-
-impl GetEditFieldContextPayload {
- pub fn new() -> GetEditFieldContextPayload {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // string field_id = 2;
-
-
- pub fn get_field_id(&self) -> &str {
- match self.one_of_field_id {
- ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_field_id(&mut self) {
- self.one_of_field_id = ::std::option::Option::None;
- }
-
- pub fn has_field_id(&self) -> bool {
- match self.one_of_field_id {
- ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.one_of_field_id = ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(_)) = self.one_of_field_id {
- } else {
- self.one_of_field_id = ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(::std::string::String::new()));
- }
- match self.one_of_field_id {
- ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- if self.has_field_id() {
- match self.one_of_field_id.take() {
- ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // .FieldType field_type = 3;
-
-
- pub fn get_field_type(&self) -> FieldType {
- self.field_type
- }
- pub fn clear_field_type(&mut self) {
- self.field_type = FieldType::RichText;
- }
-
- // Param is passed by value, moved
- pub fn set_field_type(&mut self, v: FieldType) {
- self.field_type = v;
- }
-}
-
-impl ::protobuf::Message for GetEditFieldContextPayload {
- 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.grid_id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_field_id = ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(is.read_string()?));
- },
- 3 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 3, &mut self.unknown_fields)?
- },
- _ => {
- ::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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if self.field_type != FieldType::RichText {
- my_size += ::protobuf::rt::enum_size(3, self.field_type);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_field_id {
- match v {
- &GetEditFieldContextPayload_oneof_one_of_field_id::field_id(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- 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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if self.field_type != FieldType::RichText {
- os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.field_type))?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_field_id {
- match v {
- &GetEditFieldContextPayload_oneof_one_of_field_id::field_id(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- 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() -> GetEditFieldContextPayload {
- GetEditFieldContextPayload::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>(
- "grid_id",
- |m: &GetEditFieldContextPayload| { &m.grid_id },
- |m: &mut GetEditFieldContextPayload| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "field_id",
- GetEditFieldContextPayload::has_field_id,
- GetEditFieldContextPayload::get_field_id,
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<FieldType>>(
- "field_type",
- |m: &GetEditFieldContextPayload| { &m.field_type },
- |m: &mut GetEditFieldContextPayload| { &mut m.field_type },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<GetEditFieldContextPayload>(
- "GetEditFieldContextPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static GetEditFieldContextPayload {
- static instance: ::protobuf::rt::LazyV2<GetEditFieldContextPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(GetEditFieldContextPayload::new)
- }
-}
-
-impl ::protobuf::Clear for GetEditFieldContextPayload {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.one_of_field_id = ::std::option::Option::None;
- self.field_type = FieldType::RichText;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for GetEditFieldContextPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for GetEditFieldContextPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct EditFieldPayload {
- // message fields
- pub grid_id: ::std::string::String,
- pub field_id: ::std::string::String,
- pub field_type: FieldType,
- pub create_if_not_exist: bool,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a EditFieldPayload {
- fn default() -> &'a EditFieldPayload {
- <EditFieldPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl EditFieldPayload {
- pub fn new() -> EditFieldPayload {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // string field_id = 2;
-
-
- pub fn get_field_id(&self) -> &str {
- &self.field_id
- }
- pub fn clear_field_id(&mut self) {
- self.field_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.field_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- &mut self.field_id
- }
-
- // Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
- }
-
- // .FieldType field_type = 3;
-
-
- pub fn get_field_type(&self) -> FieldType {
- self.field_type
- }
- pub fn clear_field_type(&mut self) {
- self.field_type = FieldType::RichText;
- }
-
- // Param is passed by value, moved
- pub fn set_field_type(&mut self, v: FieldType) {
- self.field_type = v;
- }
-
- // bool create_if_not_exist = 4;
-
-
- pub fn get_create_if_not_exist(&self) -> bool {
- self.create_if_not_exist
- }
- pub fn clear_create_if_not_exist(&mut self) {
- self.create_if_not_exist = false;
- }
-
- // Param is passed by value, moved
- pub fn set_create_if_not_exist(&mut self, v: bool) {
- self.create_if_not_exist = v;
- }
-}
-
-impl ::protobuf::Message for EditFieldPayload {
- 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.grid_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
- },
- 3 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 3, &mut self.unknown_fields)?
- },
- 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.create_if_not_exist = 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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if !self.field_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.field_id);
- }
- if self.field_type != FieldType::RichText {
- my_size += ::protobuf::rt::enum_size(3, self.field_type);
- }
- if self.create_if_not_exist != 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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if !self.field_id.is_empty() {
- os.write_string(2, &self.field_id)?;
- }
- if self.field_type != FieldType::RichText {
- os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.field_type))?;
- }
- if self.create_if_not_exist != false {
- os.write_bool(4, self.create_if_not_exist)?;
- }
- 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() -> EditFieldPayload {
- EditFieldPayload::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>(
- "grid_id",
- |m: &EditFieldPayload| { &m.grid_id },
- |m: &mut EditFieldPayload| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "field_id",
- |m: &EditFieldPayload| { &m.field_id },
- |m: &mut EditFieldPayload| { &mut m.field_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<FieldType>>(
- "field_type",
- |m: &EditFieldPayload| { &m.field_type },
- |m: &mut EditFieldPayload| { &mut m.field_type },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "create_if_not_exist",
- |m: &EditFieldPayload| { &m.create_if_not_exist },
- |m: &mut EditFieldPayload| { &mut m.create_if_not_exist },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<EditFieldPayload>(
- "EditFieldPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static EditFieldPayload {
- static instance: ::protobuf::rt::LazyV2<EditFieldPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(EditFieldPayload::new)
- }
-}
-
-impl ::protobuf::Clear for EditFieldPayload {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.field_id.clear();
- self.field_type = FieldType::RichText;
- self.create_if_not_exist = false;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for EditFieldPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for EditFieldPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct FieldTypeOptionContext {
- // message fields
- pub grid_id: ::std::string::String,
- pub grid_field: ::protobuf::SingularPtrField<Field>,
- pub type_option_data: ::std::vec::Vec<u8>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a FieldTypeOptionContext {
- fn default() -> &'a FieldTypeOptionContext {
- <FieldTypeOptionContext as ::protobuf::Message>::default_instance()
- }
-}
-
-impl FieldTypeOptionContext {
- pub fn new() -> FieldTypeOptionContext {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // .Field grid_field = 2;
-
-
- pub fn get_grid_field(&self) -> &Field {
- self.grid_field.as_ref().unwrap_or_else(|| <Field as ::protobuf::Message>::default_instance())
- }
- pub fn clear_grid_field(&mut self) {
- self.grid_field.clear();
- }
-
- pub fn has_grid_field(&self) -> bool {
- self.grid_field.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_grid_field(&mut self, v: Field) {
- self.grid_field = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_field(&mut self) -> &mut Field {
- if self.grid_field.is_none() {
- self.grid_field.set_default();
- }
- self.grid_field.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_grid_field(&mut self) -> Field {
- self.grid_field.take().unwrap_or_else(|| Field::new())
- }
-
- // bytes type_option_data = 3;
-
-
- pub fn get_type_option_data(&self) -> &[u8] {
- &self.type_option_data
- }
- pub fn clear_type_option_data(&mut self) {
- self.type_option_data.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
- self.type_option_data = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
- &mut self.type_option_data
- }
-
- // Take field
- pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
- ::std::mem::replace(&mut self.type_option_data, ::std::vec::Vec::new())
- }
-}
-
-impl ::protobuf::Message for FieldTypeOptionContext {
- fn is_initialized(&self) -> bool {
- for v in &self.grid_field {
- 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.grid_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.grid_field)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.type_option_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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if let Some(ref v) = self.grid_field.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if !self.type_option_data.is_empty() {
- my_size += ::protobuf::rt::bytes_size(3, &self.type_option_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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if let Some(ref v) = self.grid_field.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.type_option_data.is_empty() {
- os.write_bytes(3, &self.type_option_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) -> &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() -> FieldTypeOptionContext {
- FieldTypeOptionContext::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>(
- "grid_id",
- |m: &FieldTypeOptionContext| { &m.grid_id },
- |m: &mut FieldTypeOptionContext| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
- "grid_field",
- |m: &FieldTypeOptionContext| { &m.grid_field },
- |m: &mut FieldTypeOptionContext| { &mut m.grid_field },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "type_option_data",
- |m: &FieldTypeOptionContext| { &m.type_option_data },
- |m: &mut FieldTypeOptionContext| { &mut m.type_option_data },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldTypeOptionContext>(
- "FieldTypeOptionContext",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static FieldTypeOptionContext {
- static instance: ::protobuf::rt::LazyV2<FieldTypeOptionContext> = ::protobuf::rt::LazyV2::INIT;
- instance.get(FieldTypeOptionContext::new)
- }
-}
-
-impl ::protobuf::Clear for FieldTypeOptionContext {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.grid_field.clear();
- self.type_option_data.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for FieldTypeOptionContext {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FieldTypeOptionContext {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct FieldTypeOptionData {
- // message fields
- pub grid_id: ::std::string::String,
- pub field: ::protobuf::SingularPtrField<Field>,
- pub type_option_data: ::std::vec::Vec<u8>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a FieldTypeOptionData {
- fn default() -> &'a FieldTypeOptionData {
- <FieldTypeOptionData as ::protobuf::Message>::default_instance()
- }
-}
-
-impl FieldTypeOptionData {
- pub fn new() -> FieldTypeOptionData {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // .Field field = 2;
-
-
- pub fn get_field(&self) -> &Field {
- self.field.as_ref().unwrap_or_else(|| <Field as ::protobuf::Message>::default_instance())
- }
- pub fn clear_field(&mut self) {
- self.field.clear();
- }
-
- pub fn has_field(&self) -> bool {
- self.field.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_field(&mut self, v: Field) {
- self.field = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field(&mut self) -> &mut Field {
- if self.field.is_none() {
- self.field.set_default();
- }
- self.field.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_field(&mut self) -> Field {
- self.field.take().unwrap_or_else(|| Field::new())
- }
-
- // bytes type_option_data = 3;
-
-
- pub fn get_type_option_data(&self) -> &[u8] {
- &self.type_option_data
- }
- pub fn clear_type_option_data(&mut self) {
- self.type_option_data.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
- self.type_option_data = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
- &mut self.type_option_data
- }
-
- // Take field
- pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
- ::std::mem::replace(&mut self.type_option_data, ::std::vec::Vec::new())
- }
-}
-
-impl ::protobuf::Message for FieldTypeOptionData {
- fn is_initialized(&self) -> bool {
- for v in &self.field {
- 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.grid_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.type_option_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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if let Some(ref v) = self.field.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if !self.type_option_data.is_empty() {
- my_size += ::protobuf::rt::bytes_size(3, &self.type_option_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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if let Some(ref v) = self.field.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.type_option_data.is_empty() {
- os.write_bytes(3, &self.type_option_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) -> &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() -> FieldTypeOptionData {
- FieldTypeOptionData::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>(
- "grid_id",
- |m: &FieldTypeOptionData| { &m.grid_id },
- |m: &mut FieldTypeOptionData| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
- "field",
- |m: &FieldTypeOptionData| { &m.field },
- |m: &mut FieldTypeOptionData| { &mut m.field },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "type_option_data",
- |m: &FieldTypeOptionData| { &m.type_option_data },
- |m: &mut FieldTypeOptionData| { &mut m.type_option_data },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldTypeOptionData>(
- "FieldTypeOptionData",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static FieldTypeOptionData {
- static instance: ::protobuf::rt::LazyV2<FieldTypeOptionData> = ::protobuf::rt::LazyV2::INIT;
- instance.get(FieldTypeOptionData::new)
- }
-}
-
-impl ::protobuf::Clear for FieldTypeOptionData {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.field.clear();
- self.type_option_data.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for FieldTypeOptionData {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FieldTypeOptionData {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedField {
- // message fields
- pub items: ::protobuf::RepeatedField<Field>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedField {
- fn default() -> &'a RepeatedField {
- <RepeatedField as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedField {
- pub fn new() -> RepeatedField {
- ::std::default::Default::default()
- }
-
- // repeated .Field items = 1;
-
-
- pub fn get_items(&self) -> &[Field] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Field>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Field> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Field> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedField {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- _ => {
- ::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.items {
- 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.items {
- 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) -> &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() -> RepeatedField {
- RepeatedField::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
- "items",
- |m: &RepeatedField| { &m.items },
- |m: &mut RepeatedField| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedField>(
- "RepeatedField",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedField {
- static instance: ::protobuf::rt::LazyV2<RepeatedField> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedField::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedField {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedField {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedField {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedFieldOrder {
- // message fields
- pub items: ::protobuf::RepeatedField<FieldOrder>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedFieldOrder {
- fn default() -> &'a RepeatedFieldOrder {
- <RepeatedFieldOrder as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedFieldOrder {
- pub fn new() -> RepeatedFieldOrder {
- ::std::default::Default::default()
- }
-
- // repeated .FieldOrder items = 1;
-
-
- pub fn get_items(&self) -> &[FieldOrder] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<FieldOrder>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<FieldOrder> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<FieldOrder> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedFieldOrder {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- _ => {
- ::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.items {
- 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.items {
- 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) -> &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() -> RepeatedFieldOrder {
- RepeatedFieldOrder::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FieldOrder>>(
- "items",
- |m: &RepeatedFieldOrder| { &m.items },
- |m: &mut RepeatedFieldOrder| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedFieldOrder>(
- "RepeatedFieldOrder",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedFieldOrder {
- static instance: ::protobuf::rt::LazyV2<RepeatedFieldOrder> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedFieldOrder::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedFieldOrder {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedFieldOrder {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedFieldOrder {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct InsertFieldPayload {
- // message fields
- pub grid_id: ::std::string::String,
- pub field: ::protobuf::SingularPtrField<Field>,
- pub type_option_data: ::std::vec::Vec<u8>,
- // message oneof groups
- pub one_of_start_field_id: ::std::option::Option<InsertFieldPayload_oneof_one_of_start_field_id>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a InsertFieldPayload {
- fn default() -> &'a InsertFieldPayload {
- <InsertFieldPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum InsertFieldPayload_oneof_one_of_start_field_id {
- start_field_id(::std::string::String),
-}
-
-impl InsertFieldPayload {
- pub fn new() -> InsertFieldPayload {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // .Field field = 2;
-
-
- pub fn get_field(&self) -> &Field {
- self.field.as_ref().unwrap_or_else(|| <Field as ::protobuf::Message>::default_instance())
- }
- pub fn clear_field(&mut self) {
- self.field.clear();
- }
-
- pub fn has_field(&self) -> bool {
- self.field.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_field(&mut self, v: Field) {
- self.field = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field(&mut self) -> &mut Field {
- if self.field.is_none() {
- self.field.set_default();
- }
- self.field.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_field(&mut self) -> Field {
- self.field.take().unwrap_or_else(|| Field::new())
- }
-
- // bytes type_option_data = 3;
-
-
- pub fn get_type_option_data(&self) -> &[u8] {
- &self.type_option_data
- }
- pub fn clear_type_option_data(&mut self) {
- self.type_option_data.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
- self.type_option_data = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
- &mut self.type_option_data
- }
-
- // Take field
- pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
- ::std::mem::replace(&mut self.type_option_data, ::std::vec::Vec::new())
- }
-
- // string start_field_id = 4;
-
-
- pub fn get_start_field_id(&self) -> &str {
- match self.one_of_start_field_id {
- ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_start_field_id(&mut self) {
- self.one_of_start_field_id = ::std::option::Option::None;
- }
-
- pub fn has_start_field_id(&self) -> bool {
- match self.one_of_start_field_id {
- ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_start_field_id(&mut self, v: ::std::string::String) {
- self.one_of_start_field_id = ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_start_field_id(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(_)) = self.one_of_start_field_id {
- } else {
- self.one_of_start_field_id = ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(::std::string::String::new()));
- }
- match self.one_of_start_field_id {
- ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_start_field_id(&mut self) -> ::std::string::String {
- if self.has_start_field_id() {
- match self.one_of_start_field_id.take() {
- ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for InsertFieldPayload {
- fn is_initialized(&self) -> bool {
- for v in &self.field {
- 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.grid_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.type_option_data)?;
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_start_field_id = ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(is.read_string()?));
- },
- _ => {
- ::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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if let Some(ref v) = self.field.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if !self.type_option_data.is_empty() {
- my_size += ::protobuf::rt::bytes_size(3, &self.type_option_data);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_start_field_id {
- match v {
- &InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(ref v) => {
- my_size += ::protobuf::rt::string_size(4, &v);
- },
- };
- }
- 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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if let Some(ref v) = self.field.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.type_option_data.is_empty() {
- os.write_bytes(3, &self.type_option_data)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_start_field_id {
- match v {
- &InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(ref v) => {
- os.write_string(4, v)?;
- },
- };
- }
- 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() -> InsertFieldPayload {
- InsertFieldPayload::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>(
- "grid_id",
- |m: &InsertFieldPayload| { &m.grid_id },
- |m: &mut InsertFieldPayload| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
- "field",
- |m: &InsertFieldPayload| { &m.field },
- |m: &mut InsertFieldPayload| { &mut m.field },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "type_option_data",
- |m: &InsertFieldPayload| { &m.type_option_data },
- |m: &mut InsertFieldPayload| { &mut m.type_option_data },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "start_field_id",
- InsertFieldPayload::has_start_field_id,
- InsertFieldPayload::get_start_field_id,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<InsertFieldPayload>(
- "InsertFieldPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static InsertFieldPayload {
- static instance: ::protobuf::rt::LazyV2<InsertFieldPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(InsertFieldPayload::new)
- }
-}
-
-impl ::protobuf::Clear for InsertFieldPayload {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.field.clear();
- self.type_option_data.clear();
- self.one_of_start_field_id = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for InsertFieldPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for InsertFieldPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UpdateFieldTypeOptionPayload {
- // message fields
- pub grid_id: ::std::string::String,
- pub field_id: ::std::string::String,
- pub type_option_data: ::std::vec::Vec<u8>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UpdateFieldTypeOptionPayload {
- fn default() -> &'a UpdateFieldTypeOptionPayload {
- <UpdateFieldTypeOptionPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl UpdateFieldTypeOptionPayload {
- pub fn new() -> UpdateFieldTypeOptionPayload {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // string field_id = 2;
-
-
- pub fn get_field_id(&self) -> &str {
- &self.field_id
- }
- pub fn clear_field_id(&mut self) {
- self.field_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.field_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- &mut self.field_id
- }
-
- // Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
- }
-
- // bytes type_option_data = 3;
-
-
- pub fn get_type_option_data(&self) -> &[u8] {
- &self.type_option_data
- }
- pub fn clear_type_option_data(&mut self) {
- self.type_option_data.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
- self.type_option_data = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
- &mut self.type_option_data
- }
-
- // Take field
- pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
- ::std::mem::replace(&mut self.type_option_data, ::std::vec::Vec::new())
- }
-}
-
-impl ::protobuf::Message for UpdateFieldTypeOptionPayload {
- 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.grid_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.type_option_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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if !self.field_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.field_id);
- }
- if !self.type_option_data.is_empty() {
- my_size += ::protobuf::rt::bytes_size(3, &self.type_option_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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if !self.field_id.is_empty() {
- os.write_string(2, &self.field_id)?;
- }
- if !self.type_option_data.is_empty() {
- os.write_bytes(3, &self.type_option_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) -> &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() -> UpdateFieldTypeOptionPayload {
- UpdateFieldTypeOptionPayload::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>(
- "grid_id",
- |m: &UpdateFieldTypeOptionPayload| { &m.grid_id },
- |m: &mut UpdateFieldTypeOptionPayload| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "field_id",
- |m: &UpdateFieldTypeOptionPayload| { &m.field_id },
- |m: &mut UpdateFieldTypeOptionPayload| { &mut m.field_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "type_option_data",
- |m: &UpdateFieldTypeOptionPayload| { &m.type_option_data },
- |m: &mut UpdateFieldTypeOptionPayload| { &mut m.type_option_data },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateFieldTypeOptionPayload>(
- "UpdateFieldTypeOptionPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UpdateFieldTypeOptionPayload {
- static instance: ::protobuf::rt::LazyV2<UpdateFieldTypeOptionPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UpdateFieldTypeOptionPayload::new)
- }
-}
-
-impl ::protobuf::Clear for UpdateFieldTypeOptionPayload {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.field_id.clear();
- self.type_option_data.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UpdateFieldTypeOptionPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UpdateFieldTypeOptionPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct QueryFieldPayload {
- // message fields
- pub grid_id: ::std::string::String,
- pub field_orders: ::protobuf::SingularPtrField<RepeatedFieldOrder>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a QueryFieldPayload {
- fn default() -> &'a QueryFieldPayload {
- <QueryFieldPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl QueryFieldPayload {
- pub fn new() -> QueryFieldPayload {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // .RepeatedFieldOrder field_orders = 2;
-
-
- pub fn get_field_orders(&self) -> &RepeatedFieldOrder {
- self.field_orders.as_ref().unwrap_or_else(|| <RepeatedFieldOrder as ::protobuf::Message>::default_instance())
- }
- pub fn clear_field_orders(&mut self) {
- self.field_orders.clear();
- }
-
- pub fn has_field_orders(&self) -> bool {
- self.field_orders.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_field_orders(&mut self, v: RepeatedFieldOrder) {
- self.field_orders = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field_orders(&mut self) -> &mut RepeatedFieldOrder {
- if self.field_orders.is_none() {
- self.field_orders.set_default();
- }
- self.field_orders.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_field_orders(&mut self) -> RepeatedFieldOrder {
- self.field_orders.take().unwrap_or_else(|| RepeatedFieldOrder::new())
- }
-}
-
-impl ::protobuf::Message for QueryFieldPayload {
- fn is_initialized(&self) -> bool {
- for v in &self.field_orders {
- 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.grid_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field_orders)?;
- },
- _ => {
- ::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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if let Some(ref v) = self.field_orders.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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if let Some(ref v) = self.field_orders.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() -> QueryFieldPayload {
- QueryFieldPayload::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>(
- "grid_id",
- |m: &QueryFieldPayload| { &m.grid_id },
- |m: &mut QueryFieldPayload| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RepeatedFieldOrder>>(
- "field_orders",
- |m: &QueryFieldPayload| { &m.field_orders },
- |m: &mut QueryFieldPayload| { &mut m.field_orders },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<QueryFieldPayload>(
- "QueryFieldPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static QueryFieldPayload {
- static instance: ::protobuf::rt::LazyV2<QueryFieldPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(QueryFieldPayload::new)
- }
-}
-
-impl ::protobuf::Clear for QueryFieldPayload {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.field_orders.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for QueryFieldPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for QueryFieldPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct FieldChangesetPayload {
- // message fields
- pub field_id: ::std::string::String,
- pub grid_id: ::std::string::String,
- // message oneof groups
- pub one_of_name: ::std::option::Option<FieldChangesetPayload_oneof_one_of_name>,
- pub one_of_desc: ::std::option::Option<FieldChangesetPayload_oneof_one_of_desc>,
- pub one_of_field_type: ::std::option::Option<FieldChangesetPayload_oneof_one_of_field_type>,
- pub one_of_frozen: ::std::option::Option<FieldChangesetPayload_oneof_one_of_frozen>,
- pub one_of_visibility: ::std::option::Option<FieldChangesetPayload_oneof_one_of_visibility>,
- pub one_of_width: ::std::option::Option<FieldChangesetPayload_oneof_one_of_width>,
- pub one_of_type_option_data: ::std::option::Option<FieldChangesetPayload_oneof_one_of_type_option_data>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a FieldChangesetPayload {
- fn default() -> &'a FieldChangesetPayload {
- <FieldChangesetPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum FieldChangesetPayload_oneof_one_of_name {
- name(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum FieldChangesetPayload_oneof_one_of_desc {
- desc(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum FieldChangesetPayload_oneof_one_of_field_type {
- field_type(FieldType),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum FieldChangesetPayload_oneof_one_of_frozen {
- frozen(bool),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum FieldChangesetPayload_oneof_one_of_visibility {
- visibility(bool),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum FieldChangesetPayload_oneof_one_of_width {
- width(i32),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum FieldChangesetPayload_oneof_one_of_type_option_data {
- type_option_data(::std::vec::Vec<u8>),
-}
-
-impl FieldChangesetPayload {
- pub fn new() -> FieldChangesetPayload {
- ::std::default::Default::default()
- }
-
- // string field_id = 1;
-
-
- pub fn get_field_id(&self) -> &str {
- &self.field_id
- }
- pub fn clear_field_id(&mut self) {
- self.field_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.field_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- &mut self.field_id
- }
-
- // Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
- }
-
- // string grid_id = 2;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // string name = 3;
-
-
- pub fn get_name(&self) -> &str {
- match self.one_of_name {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_name(&mut self) {
- self.one_of_name = ::std::option::Option::None;
- }
-
- pub fn has_name(&self) -> bool {
- match self.one_of_name {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.one_of_name = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(_)) = self.one_of_name {
- } else {
- self.one_of_name = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(::std::string::String::new()));
- }
- match self.one_of_name {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- if self.has_name() {
- match self.one_of_name.take() {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string desc = 4;
-
-
- pub fn get_desc(&self) -> &str {
- match self.one_of_desc {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_desc(&mut self) {
- self.one_of_desc = ::std::option::Option::None;
- }
-
- pub fn has_desc(&self) -> bool {
- match self.one_of_desc {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.one_of_desc = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(_)) = self.one_of_desc {
- } else {
- self.one_of_desc = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(::std::string::String::new()));
- }
- match self.one_of_desc {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- if self.has_desc() {
- match self.one_of_desc.take() {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // .FieldType field_type = 5;
-
-
- pub fn get_field_type(&self) -> FieldType {
- match self.one_of_field_type {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(v)) => v,
- _ => FieldType::RichText,
- }
- }
- pub fn clear_field_type(&mut self) {
- self.one_of_field_type = ::std::option::Option::None;
- }
-
- pub fn has_field_type(&self) -> bool {
- match self.one_of_field_type {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_field_type(&mut self, v: FieldType) {
- self.one_of_field_type = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(v))
- }
-
- // bool frozen = 6;
-
-
- pub fn get_frozen(&self) -> bool {
- match self.one_of_frozen {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(v)) => v,
- _ => false,
- }
- }
- pub fn clear_frozen(&mut self) {
- self.one_of_frozen = ::std::option::Option::None;
- }
-
- pub fn has_frozen(&self) -> bool {
- match self.one_of_frozen {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_frozen(&mut self, v: bool) {
- self.one_of_frozen = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(v))
- }
-
- // bool visibility = 7;
-
-
- pub fn get_visibility(&self) -> bool {
- match self.one_of_visibility {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(v)) => v,
- _ => false,
- }
- }
- pub fn clear_visibility(&mut self) {
- self.one_of_visibility = ::std::option::Option::None;
- }
-
- pub fn has_visibility(&self) -> bool {
- match self.one_of_visibility {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_visibility(&mut self, v: bool) {
- self.one_of_visibility = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(v))
- }
-
- // int32 width = 8;
-
-
- pub fn get_width(&self) -> i32 {
- match self.one_of_width {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(v)) => v,
- _ => 0,
- }
- }
- pub fn clear_width(&mut self) {
- self.one_of_width = ::std::option::Option::None;
- }
-
- pub fn has_width(&self) -> bool {
- match self.one_of_width {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_width(&mut self, v: i32) {
- self.one_of_width = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(v))
- }
-
- // bytes type_option_data = 9;
-
-
- pub fn get_type_option_data(&self) -> &[u8] {
- match self.one_of_type_option_data {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref v)) => v,
- _ => &[],
- }
- }
- pub fn clear_type_option_data(&mut self) {
- self.one_of_type_option_data = ::std::option::Option::None;
- }
-
- pub fn has_type_option_data(&self) -> bool {
- match self.one_of_type_option_data {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
- self.one_of_type_option_data = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
- if let ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(_)) = self.one_of_type_option_data {
- } else {
- self.one_of_type_option_data = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(::std::vec::Vec::new()));
- }
- match self.one_of_type_option_data {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
- if self.has_type_option_data() {
- match self.one_of_type_option_data.take() {
- ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::vec::Vec::new()
- }
- }
-}
-
-impl ::protobuf::Message for FieldChangesetPayload {
- 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_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_name = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(is.read_string()?));
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_desc = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(is.read_string()?));
- },
- 5 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_field_type = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(is.read_enum()?));
- },
- 6 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_frozen = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(is.read_bool()?));
- },
- 7 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_visibility = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(is.read_bool()?));
- },
- 8 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_width = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(is.read_int32()?));
- },
- 9 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_type_option_data = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(is.read_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 !self.field_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.field_id);
- }
- if !self.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.grid_id);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &FieldChangesetPayload_oneof_one_of_name::name(ref v) => {
- my_size += ::protobuf::rt::string_size(3, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &FieldChangesetPayload_oneof_one_of_desc::desc(ref v) => {
- my_size += ::protobuf::rt::string_size(4, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_field_type {
- match v {
- &FieldChangesetPayload_oneof_one_of_field_type::field_type(v) => {
- my_size += ::protobuf::rt::enum_size(5, v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_frozen {
- match v {
- &FieldChangesetPayload_oneof_one_of_frozen::frozen(v) => {
- my_size += 2;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_visibility {
- match v {
- &FieldChangesetPayload_oneof_one_of_visibility::visibility(v) => {
- my_size += 2;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_width {
- match v {
- &FieldChangesetPayload_oneof_one_of_width::width(v) => {
- my_size += ::protobuf::rt::value_size(8, v, ::protobuf::wire_format::WireTypeVarint);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_type_option_data {
- match v {
- &FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref v) => {
- my_size += ::protobuf::rt::bytes_size(9, &v);
- },
- };
- }
- 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_id.is_empty() {
- os.write_string(1, &self.field_id)?;
- }
- if !self.grid_id.is_empty() {
- os.write_string(2, &self.grid_id)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &FieldChangesetPayload_oneof_one_of_name::name(ref v) => {
- os.write_string(3, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_desc {
- match v {
- &FieldChangesetPayload_oneof_one_of_desc::desc(ref v) => {
- os.write_string(4, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_field_type {
- match v {
- &FieldChangesetPayload_oneof_one_of_field_type::field_type(v) => {
- os.write_enum(5, ::protobuf::ProtobufEnum::value(&v))?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_frozen {
- match v {
- &FieldChangesetPayload_oneof_one_of_frozen::frozen(v) => {
- os.write_bool(6, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_visibility {
- match v {
- &FieldChangesetPayload_oneof_one_of_visibility::visibility(v) => {
- os.write_bool(7, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_width {
- match v {
- &FieldChangesetPayload_oneof_one_of_width::width(v) => {
- os.write_int32(8, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_type_option_data {
- match v {
- &FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref v) => {
- os.write_bytes(9, v)?;
- },
- };
- }
- 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() -> FieldChangesetPayload {
- FieldChangesetPayload::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>(
- "field_id",
- |m: &FieldChangesetPayload| { &m.field_id },
- |m: &mut FieldChangesetPayload| { &mut m.field_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "grid_id",
- |m: &FieldChangesetPayload| { &m.grid_id },
- |m: &mut FieldChangesetPayload| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "name",
- FieldChangesetPayload::has_name,
- FieldChangesetPayload::get_name,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "desc",
- FieldChangesetPayload::has_desc,
- FieldChangesetPayload::get_desc,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_enum_accessor::<_, FieldType>(
- "field_type",
- FieldChangesetPayload::has_field_type,
- FieldChangesetPayload::get_field_type,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
- "frozen",
- FieldChangesetPayload::has_frozen,
- FieldChangesetPayload::get_frozen,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
- "visibility",
- FieldChangesetPayload::has_visibility,
- FieldChangesetPayload::get_visibility,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor::<_>(
- "width",
- FieldChangesetPayload::has_width,
- FieldChangesetPayload::get_width,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor::<_>(
- "type_option_data",
- FieldChangesetPayload::has_type_option_data,
- FieldChangesetPayload::get_type_option_data,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldChangesetPayload>(
- "FieldChangesetPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static FieldChangesetPayload {
- static instance: ::protobuf::rt::LazyV2<FieldChangesetPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(FieldChangesetPayload::new)
- }
-}
-
-impl ::protobuf::Clear for FieldChangesetPayload {
- fn clear(&mut self) {
- self.field_id.clear();
- self.grid_id.clear();
- self.one_of_name = ::std::option::Option::None;
- self.one_of_desc = ::std::option::Option::None;
- self.one_of_field_type = ::std::option::Option::None;
- self.one_of_frozen = ::std::option::Option::None;
- self.one_of_visibility = ::std::option::Option::None;
- self.one_of_width = ::std::option::Option::None;
- self.one_of_type_option_data = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for FieldChangesetPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FieldChangesetPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum FieldType {
- RichText = 0,
- Number = 1,
- DateTime = 2,
- SingleSelect = 3,
- MultiSelect = 4,
- Checkbox = 5,
- URL = 6,
-}
-
-impl ::protobuf::ProtobufEnum for FieldType {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<FieldType> {
- match value {
- 0 => ::std::option::Option::Some(FieldType::RichText),
- 1 => ::std::option::Option::Some(FieldType::Number),
- 2 => ::std::option::Option::Some(FieldType::DateTime),
- 3 => ::std::option::Option::Some(FieldType::SingleSelect),
- 4 => ::std::option::Option::Some(FieldType::MultiSelect),
- 5 => ::std::option::Option::Some(FieldType::Checkbox),
- 6 => ::std::option::Option::Some(FieldType::URL),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [FieldType] = &[
- FieldType::RichText,
- FieldType::Number,
- FieldType::DateTime,
- FieldType::SingleSelect,
- FieldType::MultiSelect,
- FieldType::Checkbox,
- FieldType::URL,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<FieldType>("FieldType", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for FieldType {
-}
-
-impl ::std::default::Default for FieldType {
- fn default() -> Self {
- FieldType::RichText
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FieldType {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0bfield.proto\"\xd7\x01\n\x05Field\x12\x0e\n\x02id\x18\x01\x20\x01(\
- \tR\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04des\
- c\x18\x03\x20\x01(\tR\x04desc\x12)\n\nfield_type\x18\x04\x20\x01(\x0e2\n\
- .FieldTypeR\tfieldType\x12\x16\n\x06frozen\x18\x05\x20\x01(\x08R\x06froz\
- en\x12\x1e\n\nvisibility\x18\x06\x20\x01(\x08R\nvisibility\x12\x14\n\x05\
- width\x18\x07\x20\x01(\x05R\x05width\x12\x1d\n\nis_primary\x18\x08\x20\
- \x01(\x08R\tisPrimary\"'\n\nFieldOrder\x12\x19\n\x08field_id\x18\x01\x20\
- \x01(\tR\x07fieldId\"\xc6\x01\n\x12GridFieldChangeset\x12\x17\n\x07grid_\
- id\x18\x01\x20\x01(\tR\x06gridId\x124\n\x0finserted_fields\x18\x02\x20\
- \x03(\x0b2\x0b.IndexFieldR\x0einsertedFields\x122\n\x0edeleted_fields\
- \x18\x03\x20\x03(\x0b2\x0b.FieldOrderR\rdeletedFields\x12-\n\x0eupdated_\
- fields\x18\x04\x20\x03(\x0b2\x06.FieldR\rupdatedFields\"@\n\nIndexField\
- \x12\x1c\n\x05field\x18\x01\x20\x01(\x0b2\x06.FieldR\x05field\x12\x14\n\
- \x05index\x18\x02\x20\x01(\x05R\x05index\"\x90\x01\n\x1aGetEditFieldCont\
- extPayload\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x12\x1b\n\
- \x08field_id\x18\x02\x20\x01(\tH\0R\x07fieldId\x12)\n\nfield_type\x18\
- \x03\x20\x01(\x0e2\n.FieldTypeR\tfieldTypeB\x11\n\x0fone_of_field_id\"\
- \xa0\x01\n\x10EditFieldPayload\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\
- \x06gridId\x12\x19\n\x08field_id\x18\x02\x20\x01(\tR\x07fieldId\x12)\n\n\
- field_type\x18\x03\x20\x01(\x0e2\n.FieldTypeR\tfieldType\x12-\n\x13creat\
- e_if_not_exist\x18\x04\x20\x01(\x08R\x10createIfNotExist\"\x82\x01\n\x16\
- FieldTypeOptionContext\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridI\
- d\x12%\n\ngrid_field\x18\x02\x20\x01(\x0b2\x06.FieldR\tgridField\x12(\n\
- \x10type_option_data\x18\x03\x20\x01(\x0cR\x0etypeOptionData\"v\n\x13Fie\
- ldTypeOptionData\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x12\
- \x1c\n\x05field\x18\x02\x20\x01(\x0b2\x06.FieldR\x05field\x12(\n\x10type\
- _option_data\x18\x03\x20\x01(\x0cR\x0etypeOptionData\"-\n\rRepeatedField\
- \x12\x1c\n\x05items\x18\x01\x20\x03(\x0b2\x06.FieldR\x05items\"7\n\x12Re\
- peatedFieldOrder\x12!\n\x05items\x18\x01\x20\x03(\x0b2\x0b.FieldOrderR\
- \x05items\"\xb6\x01\n\x12InsertFieldPayload\x12\x17\n\x07grid_id\x18\x01\
- \x20\x01(\tR\x06gridId\x12\x1c\n\x05field\x18\x02\x20\x01(\x0b2\x06.Fiel\
- dR\x05field\x12(\n\x10type_option_data\x18\x03\x20\x01(\x0cR\x0etypeOpti\
- onData\x12&\n\x0estart_field_id\x18\x04\x20\x01(\tH\0R\x0cstartFieldIdB\
- \x17\n\x15one_of_start_field_id\"|\n\x1cUpdateFieldTypeOptionPayload\x12\
- \x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x12\x19\n\x08field_id\
- \x18\x02\x20\x01(\tR\x07fieldId\x12(\n\x10type_option_data\x18\x03\x20\
- \x01(\x0cR\x0etypeOptionData\"d\n\x11QueryFieldPayload\x12\x17\n\x07grid\
- _id\x18\x01\x20\x01(\tR\x06gridId\x126\n\x0cfield_orders\x18\x02\x20\x01\
- (\x0b2\x13.RepeatedFieldOrderR\x0bfieldOrders\"\xa8\x03\n\x15FieldChange\
- setPayload\x12\x19\n\x08field_id\x18\x01\x20\x01(\tR\x07fieldId\x12\x17\
- \n\x07grid_id\x18\x02\x20\x01(\tR\x06gridId\x12\x14\n\x04name\x18\x03\
- \x20\x01(\tH\0R\x04name\x12\x14\n\x04desc\x18\x04\x20\x01(\tH\x01R\x04de\
- sc\x12+\n\nfield_type\x18\x05\x20\x01(\x0e2\n.FieldTypeH\x02R\tfieldType\
- \x12\x18\n\x06frozen\x18\x06\x20\x01(\x08H\x03R\x06frozen\x12\x20\n\nvis\
- ibility\x18\x07\x20\x01(\x08H\x04R\nvisibility\x12\x16\n\x05width\x18\
- \x08\x20\x01(\x05H\x05R\x05width\x12*\n\x10type_option_data\x18\t\x20\
- \x01(\x0cH\x06R\x0etypeOptionDataB\r\n\x0bone_of_nameB\r\n\x0bone_of_des\
- cB\x13\n\x11one_of_field_typeB\x0f\n\rone_of_frozenB\x13\n\x11one_of_vis\
- ibilityB\x0e\n\x0cone_of_widthB\x19\n\x17one_of_type_option_data*m\n\tFi\
- eldType\x12\x0c\n\x08RichText\x10\0\x12\n\n\x06Number\x10\x01\x12\x0c\n\
- \x08DateTime\x10\x02\x12\x10\n\x0cSingleSelect\x10\x03\x12\x0f\n\x0bMult\
- iSelect\x10\x04\x12\x0c\n\x08Checkbox\x10\x05\x12\x07\n\x03URL\x10\x06b\
- \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()
- })
-}
diff --git a/shared-lib/flowy-grid-data-model/src/protobuf/model/grid.rs b/shared-lib/flowy-grid-data-model/src/protobuf/model/grid.rs
deleted file mode 100644
index fae8c14360..0000000000
--- a/shared-lib/flowy-grid-data-model/src/protobuf/model/grid.rs
+++ /dev/null
@@ -1,4296 +0,0 @@
-// 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 `grid.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 Grid {
- // message fields
- pub id: ::std::string::String,
- pub field_orders: ::protobuf::RepeatedField<super::field::FieldOrder>,
- pub block_orders: ::protobuf::RepeatedField<GridBlockOrder>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a Grid {
- fn default() -> &'a Grid {
- <Grid as ::protobuf::Message>::default_instance()
- }
-}
-
-impl Grid {
- pub fn new() -> Grid {
- ::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())
- }
-
- // repeated .FieldOrder field_orders = 2;
-
-
- pub fn get_field_orders(&self) -> &[super::field::FieldOrder] {
- &self.field_orders
- }
- pub fn clear_field_orders(&mut self) {
- self.field_orders.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_field_orders(&mut self, v: ::protobuf::RepeatedField<super::field::FieldOrder>) {
- self.field_orders = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_field_orders(&mut self) -> &mut ::protobuf::RepeatedField<super::field::FieldOrder> {
- &mut self.field_orders
- }
-
- // Take field
- pub fn take_field_orders(&mut self) -> ::protobuf::RepeatedField<super::field::FieldOrder> {
- ::std::mem::replace(&mut self.field_orders, ::protobuf::RepeatedField::new())
- }
-
- // repeated .GridBlockOrder block_orders = 3;
-
-
- pub fn get_block_orders(&self) -> &[GridBlockOrder] {
- &self.block_orders
- }
- pub fn clear_block_orders(&mut self) {
- self.block_orders.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_block_orders(&mut self, v: ::protobuf::RepeatedField<GridBlockOrder>) {
- self.block_orders = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_block_orders(&mut self) -> &mut ::protobuf::RepeatedField<GridBlockOrder> {
- &mut self.block_orders
- }
-
- // Take field
- pub fn take_block_orders(&mut self) -> ::protobuf::RepeatedField<GridBlockOrder> {
- ::std::mem::replace(&mut self.block_orders, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for Grid {
- fn is_initialized(&self) -> bool {
- for v in &self.field_orders {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.block_orders {
- 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_repeated_message_into(wire_type, is, &mut self.field_orders)?;
- },
- 3 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.block_orders)?;
- },
- _ => {
- ::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);
- }
- for value in &self.field_orders {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- };
- for value in &self.block_orders {
- 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.id.is_empty() {
- os.write_string(1, &self.id)?;
- }
- for v in &self.field_orders {
- 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.block_orders {
- 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) -> &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() -> Grid {
- Grid::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: &Grid| { &m.id },
- |m: &mut Grid| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::field::FieldOrder>>(
- "field_orders",
- |m: &Grid| { &m.field_orders },
- |m: &mut Grid| { &mut m.field_orders },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GridBlockOrder>>(
- "block_orders",
- |m: &Grid| { &m.block_orders },
- |m: &mut Grid| { &mut m.block_orders },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<Grid>(
- "Grid",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static Grid {
- static instance: ::protobuf::rt::LazyV2<Grid> = ::protobuf::rt::LazyV2::INIT;
- instance.get(Grid::new)
- }
-}
-
-impl ::protobuf::Clear for Grid {
- fn clear(&mut self) {
- self.id.clear();
- self.field_orders.clear();
- self.block_orders.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for Grid {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for Grid {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RowOrder {
- // message fields
- pub row_id: ::std::string::String,
- pub block_id: ::std::string::String,
- pub height: i32,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RowOrder {
- fn default() -> &'a RowOrder {
- <RowOrder as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RowOrder {
- pub fn new() -> RowOrder {
- ::std::default::Default::default()
- }
-
- // string row_id = 1;
-
-
- pub fn get_row_id(&self) -> &str {
- &self.row_id
- }
- pub fn clear_row_id(&mut self) {
- self.row_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_row_id(&mut self, v: ::std::string::String) {
- self.row_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_row_id(&mut self) -> &mut ::std::string::String {
- &mut self.row_id
- }
-
- // Take field
- pub fn take_row_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.row_id, ::std::string::String::new())
- }
-
- // string block_id = 2;
-
-
- 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())
- }
-
- // int32 height = 3;
-
-
- pub fn get_height(&self) -> i32 {
- self.height
- }
- pub fn clear_height(&mut self) {
- self.height = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_height(&mut self, v: i32) {
- self.height = v;
- }
-}
-
-impl ::protobuf::Message for RowOrder {
- 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.row_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.block_id)?;
- },
- 3 => {
- 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.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.row_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.row_id);
- }
- if !self.block_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.block_id);
- }
- if self.height != 0 {
- my_size += ::protobuf::rt::value_size(3, 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.row_id.is_empty() {
- os.write_string(1, &self.row_id)?;
- }
- if !self.block_id.is_empty() {
- os.write_string(2, &self.block_id)?;
- }
- if self.height != 0 {
- os.write_int32(3, 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) -> &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() -> RowOrder {
- RowOrder::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>(
- "row_id",
- |m: &RowOrder| { &m.row_id },
- |m: &mut RowOrder| { &mut m.row_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "block_id",
- |m: &RowOrder| { &m.block_id },
- |m: &mut RowOrder| { &mut m.block_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "height",
- |m: &RowOrder| { &m.height },
- |m: &mut RowOrder| { &mut m.height },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RowOrder>(
- "RowOrder",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RowOrder {
- static instance: ::protobuf::rt::LazyV2<RowOrder> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RowOrder::new)
- }
-}
-
-impl ::protobuf::Clear for RowOrder {
- fn clear(&mut self) {
- self.row_id.clear();
- self.block_id.clear();
- self.height = 0;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RowOrder {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RowOrder {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct Row {
- // message fields
- pub id: ::std::string::String,
- pub cell_by_field_id: ::std::collections::HashMap<::std::string::String, Cell>,
- pub height: i32,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a Row {
- fn default() -> &'a Row {
- <Row as ::protobuf::Message>::default_instance()
- }
-}
-
-impl Row {
- pub fn new() -> Row {
- ::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())
- }
-
- // repeated .Row.CellByFieldIdEntry cell_by_field_id = 2;
-
-
- pub fn get_cell_by_field_id(&self) -> &::std::collections::HashMap<::std::string::String, Cell> {
- &self.cell_by_field_id
- }
- pub fn clear_cell_by_field_id(&mut self) {
- self.cell_by_field_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_cell_by_field_id(&mut self, v: ::std::collections::HashMap<::std::string::String, Cell>) {
- self.cell_by_field_id = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_cell_by_field_id(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, Cell> {
- &mut self.cell_by_field_id
- }
-
- // Take field
- pub fn take_cell_by_field_id(&mut self) -> ::std::collections::HashMap<::std::string::String, Cell> {
- ::std::mem::replace(&mut self.cell_by_field_id, ::std::collections::HashMap::new())
- }
-
- // int32 height = 3;
-
-
- pub fn get_height(&self) -> i32 {
- self.height
- }
- pub fn clear_height(&mut self) {
- self.height = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_height(&mut self, v: i32) {
- self.height = v;
- }
-}
-
-impl ::protobuf::Message for Row {
- 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.id)?;
- },
- 2 => {
- ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(wire_type, is, &mut self.cell_by_field_id)?;
- },
- 3 => {
- 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.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.id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.id);
- }
- my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(2, &self.cell_by_field_id);
- if self.height != 0 {
- my_size += ::protobuf::rt::value_size(3, 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.id.is_empty() {
- os.write_string(1, &self.id)?;
- }
- ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(2, &self.cell_by_field_id, os)?;
- if self.height != 0 {
- os.write_int32(3, 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) -> &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() -> Row {
- Row::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: &Row| { &m.id },
- |m: &mut Row| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(
- "cell_by_field_id",
- |m: &Row| { &m.cell_by_field_id },
- |m: &mut Row| { &mut m.cell_by_field_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "height",
- |m: &Row| { &m.height },
- |m: &mut Row| { &mut m.height },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<Row>(
- "Row",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static Row {
- static instance: ::protobuf::rt::LazyV2<Row> = ::protobuf::rt::LazyV2::INIT;
- instance.get(Row::new)
- }
-}
-
-impl ::protobuf::Clear for Row {
- fn clear(&mut self) {
- self.id.clear();
- self.cell_by_field_id.clear();
- self.height = 0;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for Row {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for Row {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedRow {
- // message fields
- pub items: ::protobuf::RepeatedField<Row>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedRow {
- fn default() -> &'a RepeatedRow {
- <RepeatedRow as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedRow {
- pub fn new() -> RepeatedRow {
- ::std::default::Default::default()
- }
-
- // repeated .Row items = 1;
-
-
- pub fn get_items(&self) -> &[Row] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Row>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Row> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Row> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedRow {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- _ => {
- ::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.items {
- 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.items {
- 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) -> &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() -> RepeatedRow {
- RepeatedRow::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Row>>(
- "items",
- |m: &RepeatedRow| { &m.items },
- |m: &mut RepeatedRow| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedRow>(
- "RepeatedRow",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedRow {
- static instance: ::protobuf::rt::LazyV2<RepeatedRow> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedRow::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedRow {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedRow {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedRow {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedGridBlock {
- // message fields
- pub items: ::protobuf::RepeatedField<GridBlock>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedGridBlock {
- fn default() -> &'a RepeatedGridBlock {
- <RepeatedGridBlock as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedGridBlock {
- pub fn new() -> RepeatedGridBlock {
- ::std::default::Default::default()
- }
-
- // repeated .GridBlock items = 1;
-
-
- pub fn get_items(&self) -> &[GridBlock] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<GridBlock>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<GridBlock> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<GridBlock> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedGridBlock {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- _ => {
- ::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.items {
- 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.items {
- 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) -> &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() -> RepeatedGridBlock {
- RepeatedGridBlock::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GridBlock>>(
- "items",
- |m: &RepeatedGridBlock| { &m.items },
- |m: &mut RepeatedGridBlock| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedGridBlock>(
- "RepeatedGridBlock",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedGridBlock {
- static instance: ::protobuf::rt::LazyV2<RepeatedGridBlock> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedGridBlock::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedGridBlock {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedGridBlock {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedGridBlock {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct GridBlockOrder {
- // message fields
- pub block_id: ::std::string::String,
- pub row_orders: ::protobuf::RepeatedField<RowOrder>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a GridBlockOrder {
- fn default() -> &'a GridBlockOrder {
- <GridBlockOrder as ::protobuf::Message>::default_instance()
- }
-}
-
-impl GridBlockOrder {
- pub fn new() -> GridBlockOrder {
- ::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())
- }
-
- // repeated .RowOrder row_orders = 2;
-
-
- pub fn get_row_orders(&self) -> &[RowOrder] {
- &self.row_orders
- }
- pub fn clear_row_orders(&mut self) {
- self.row_orders.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_row_orders(&mut self, v: ::protobuf::RepeatedField<RowOrder>) {
- self.row_orders = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_row_orders(&mut self) -> &mut ::protobuf::RepeatedField<RowOrder> {
- &mut self.row_orders
- }
-
- // Take field
- pub fn take_row_orders(&mut self) -> ::protobuf::RepeatedField<RowOrder> {
- ::std::mem::replace(&mut self.row_orders, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for GridBlockOrder {
- fn is_initialized(&self) -> bool {
- for v in &self.row_orders {
- 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_repeated_message_into(wire_type, is, &mut self.row_orders)?;
- },
- _ => {
- ::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);
- }
- for value in &self.row_orders {
- 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.block_id.is_empty() {
- os.write_string(1, &self.block_id)?;
- }
- for v in &self.row_orders {
- 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() -> GridBlockOrder {
- GridBlockOrder::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: &GridBlockOrder| { &m.block_id },
- |m: &mut GridBlockOrder| { &mut m.block_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RowOrder>>(
- "row_orders",
- |m: &GridBlockOrder| { &m.row_orders },
- |m: &mut GridBlockOrder| { &mut m.row_orders },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridBlockOrder>(
- "GridBlockOrder",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static GridBlockOrder {
- static instance: ::protobuf::rt::LazyV2<GridBlockOrder> = ::protobuf::rt::LazyV2::INIT;
- instance.get(GridBlockOrder::new)
- }
-}
-
-impl ::protobuf::Clear for GridBlockOrder {
- fn clear(&mut self) {
- self.block_id.clear();
- self.row_orders.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for GridBlockOrder {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for GridBlockOrder {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct IndexRowOrder {
- // message fields
- pub row_order: ::protobuf::SingularPtrField<RowOrder>,
- // message oneof groups
- pub one_of_index: ::std::option::Option<IndexRowOrder_oneof_one_of_index>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a IndexRowOrder {
- fn default() -> &'a IndexRowOrder {
- <IndexRowOrder as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum IndexRowOrder_oneof_one_of_index {
- index(i32),
-}
-
-impl IndexRowOrder {
- pub fn new() -> IndexRowOrder {
- ::std::default::Default::default()
- }
-
- // .RowOrder row_order = 1;
-
-
- pub fn get_row_order(&self) -> &RowOrder {
- self.row_order.as_ref().unwrap_or_else(|| <RowOrder as ::protobuf::Message>::default_instance())
- }
- pub fn clear_row_order(&mut self) {
- self.row_order.clear();
- }
-
- pub fn has_row_order(&self) -> bool {
- self.row_order.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_row_order(&mut self, v: RowOrder) {
- self.row_order = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_row_order(&mut self) -> &mut RowOrder {
- if self.row_order.is_none() {
- self.row_order.set_default();
- }
- self.row_order.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_row_order(&mut self) -> RowOrder {
- self.row_order.take().unwrap_or_else(|| RowOrder::new())
- }
-
- // int32 index = 2;
-
-
- pub fn get_index(&self) -> i32 {
- match self.one_of_index {
- ::std::option::Option::Some(IndexRowOrder_oneof_one_of_index::index(v)) => v,
- _ => 0,
- }
- }
- pub fn clear_index(&mut self) {
- self.one_of_index = ::std::option::Option::None;
- }
-
- pub fn has_index(&self) -> bool {
- match self.one_of_index {
- ::std::option::Option::Some(IndexRowOrder_oneof_one_of_index::index(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_index(&mut self, v: i32) {
- self.one_of_index = ::std::option::Option::Some(IndexRowOrder_oneof_one_of_index::index(v))
- }
-}
-
-impl ::protobuf::Message for IndexRowOrder {
- fn is_initialized(&self) -> bool {
- for v in &self.row_order {
- 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.row_order)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_index = ::std::option::Option::Some(IndexRowOrder_oneof_one_of_index::index(is.read_int32()?));
- },
- _ => {
- ::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.row_order.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_index {
- match v {
- &IndexRowOrder_oneof_one_of_index::index(v) => {
- my_size += ::protobuf::rt::value_size(2, v, ::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.row_order.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 ::std::option::Option::Some(ref v) = self.one_of_index {
- match v {
- &IndexRowOrder_oneof_one_of_index::index(v) => {
- os.write_int32(2, v)?;
- },
- };
- }
- 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() -> IndexRowOrder {
- IndexRowOrder::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RowOrder>>(
- "row_order",
- |m: &IndexRowOrder| { &m.row_order },
- |m: &mut IndexRowOrder| { &mut m.row_order },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor::<_>(
- "index",
- IndexRowOrder::has_index,
- IndexRowOrder::get_index,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<IndexRowOrder>(
- "IndexRowOrder",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static IndexRowOrder {
- static instance: ::protobuf::rt::LazyV2<IndexRowOrder> = ::protobuf::rt::LazyV2::INIT;
- instance.get(IndexRowOrder::new)
- }
-}
-
-impl ::protobuf::Clear for IndexRowOrder {
- fn clear(&mut self) {
- self.row_order.clear();
- self.one_of_index = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for IndexRowOrder {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for IndexRowOrder {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UpdatedRowOrder {
- // message fields
- pub row_order: ::protobuf::SingularPtrField<RowOrder>,
- pub row: ::protobuf::SingularPtrField<Row>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UpdatedRowOrder {
- fn default() -> &'a UpdatedRowOrder {
- <UpdatedRowOrder as ::protobuf::Message>::default_instance()
- }
-}
-
-impl UpdatedRowOrder {
- pub fn new() -> UpdatedRowOrder {
- ::std::default::Default::default()
- }
-
- // .RowOrder row_order = 1;
-
-
- pub fn get_row_order(&self) -> &RowOrder {
- self.row_order.as_ref().unwrap_or_else(|| <RowOrder as ::protobuf::Message>::default_instance())
- }
- pub fn clear_row_order(&mut self) {
- self.row_order.clear();
- }
-
- pub fn has_row_order(&self) -> bool {
- self.row_order.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_row_order(&mut self, v: RowOrder) {
- self.row_order = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_row_order(&mut self) -> &mut RowOrder {
- if self.row_order.is_none() {
- self.row_order.set_default();
- }
- self.row_order.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_row_order(&mut self) -> RowOrder {
- self.row_order.take().unwrap_or_else(|| RowOrder::new())
- }
-
- // .Row row = 2;
-
-
- pub fn get_row(&self) -> &Row {
- self.row.as_ref().unwrap_or_else(|| <Row as ::protobuf::Message>::default_instance())
- }
- pub fn clear_row(&mut self) {
- self.row.clear();
- }
-
- pub fn has_row(&self) -> bool {
- self.row.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_row(&mut self, v: Row) {
- self.row = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_row(&mut self) -> &mut Row {
- if self.row.is_none() {
- self.row.set_default();
- }
- self.row.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_row(&mut self) -> Row {
- self.row.take().unwrap_or_else(|| Row::new())
- }
-}
-
-impl ::protobuf::Message for UpdatedRowOrder {
- fn is_initialized(&self) -> bool {
- for v in &self.row_order {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.row {
- 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.row_order)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.row)?;
- },
- _ => {
- ::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.row_order.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let Some(ref v) = self.row.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.row_order.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.row.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() -> UpdatedRowOrder {
- UpdatedRowOrder::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RowOrder>>(
- "row_order",
- |m: &UpdatedRowOrder| { &m.row_order },
- |m: &mut UpdatedRowOrder| { &mut m.row_order },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Row>>(
- "row",
- |m: &UpdatedRowOrder| { &m.row },
- |m: &mut UpdatedRowOrder| { &mut m.row },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdatedRowOrder>(
- "UpdatedRowOrder",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UpdatedRowOrder {
- static instance: ::protobuf::rt::LazyV2<UpdatedRowOrder> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UpdatedRowOrder::new)
- }
-}
-
-impl ::protobuf::Clear for UpdatedRowOrder {
- fn clear(&mut self) {
- self.row_order.clear();
- self.row.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UpdatedRowOrder {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UpdatedRowOrder {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct GridRowsChangeset {
- // message fields
- pub block_id: ::std::string::String,
- pub inserted_rows: ::protobuf::RepeatedField<IndexRowOrder>,
- pub deleted_rows: ::protobuf::RepeatedField<RowOrder>,
- pub updated_rows: ::protobuf::RepeatedField<UpdatedRowOrder>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a GridRowsChangeset {
- fn default() -> &'a GridRowsChangeset {
- <GridRowsChangeset as ::protobuf::Message>::default_instance()
- }
-}
-
-impl GridRowsChangeset {
- pub fn new() -> GridRowsChangeset {
- ::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())
- }
-
- // repeated .IndexRowOrder inserted_rows = 2;
-
-
- pub fn get_inserted_rows(&self) -> &[IndexRowOrder] {
- &self.inserted_rows
- }
- pub fn clear_inserted_rows(&mut self) {
- self.inserted_rows.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_inserted_rows(&mut self, v: ::protobuf::RepeatedField<IndexRowOrder>) {
- self.inserted_rows = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_inserted_rows(&mut self) -> &mut ::protobuf::RepeatedField<IndexRowOrder> {
- &mut self.inserted_rows
- }
-
- // Take field
- pub fn take_inserted_rows(&mut self) -> ::protobuf::RepeatedField<IndexRowOrder> {
- ::std::mem::replace(&mut self.inserted_rows, ::protobuf::RepeatedField::new())
- }
-
- // repeated .RowOrder deleted_rows = 3;
-
-
- pub fn get_deleted_rows(&self) -> &[RowOrder] {
- &self.deleted_rows
- }
- pub fn clear_deleted_rows(&mut self) {
- self.deleted_rows.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_deleted_rows(&mut self, v: ::protobuf::RepeatedField<RowOrder>) {
- self.deleted_rows = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_deleted_rows(&mut self) -> &mut ::protobuf::RepeatedField<RowOrder> {
- &mut self.deleted_rows
- }
-
- // Take field
- pub fn take_deleted_rows(&mut self) -> ::protobuf::RepeatedField<RowOrder> {
- ::std::mem::replace(&mut self.deleted_rows, ::protobuf::RepeatedField::new())
- }
-
- // repeated .UpdatedRowOrder updated_rows = 4;
-
-
- pub fn get_updated_rows(&self) -> &[UpdatedRowOrder] {
- &self.updated_rows
- }
- pub fn clear_updated_rows(&mut self) {
- self.updated_rows.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_updated_rows(&mut self, v: ::protobuf::RepeatedField<UpdatedRowOrder>) {
- self.updated_rows = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_updated_rows(&mut self) -> &mut ::protobuf::RepeatedField<UpdatedRowOrder> {
- &mut self.updated_rows
- }
-
- // Take field
- pub fn take_updated_rows(&mut self) -> ::protobuf::RepeatedField<UpdatedRowOrder> {
- ::std::mem::replace(&mut self.updated_rows, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for GridRowsChangeset {
- fn is_initialized(&self) -> bool {
- for v in &self.inserted_rows {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.deleted_rows {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.updated_rows {
- 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_repeated_message_into(wire_type, is, &mut self.inserted_rows)?;
- },
- 3 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.deleted_rows)?;
- },
- 4 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.updated_rows)?;
- },
- _ => {
- ::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);
- }
- for value in &self.inserted_rows {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- };
- for value in &self.deleted_rows {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- };
- for value in &self.updated_rows {
- 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.block_id.is_empty() {
- os.write_string(1, &self.block_id)?;
- }
- for v in &self.inserted_rows {
- 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.deleted_rows {
- 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.updated_rows {
- 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) -> &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() -> GridRowsChangeset {
- GridRowsChangeset::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: &GridRowsChangeset| { &m.block_id },
- |m: &mut GridRowsChangeset| { &mut m.block_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<IndexRowOrder>>(
- "inserted_rows",
- |m: &GridRowsChangeset| { &m.inserted_rows },
- |m: &mut GridRowsChangeset| { &mut m.inserted_rows },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RowOrder>>(
- "deleted_rows",
- |m: &GridRowsChangeset| { &m.deleted_rows },
- |m: &mut GridRowsChangeset| { &mut m.deleted_rows },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<UpdatedRowOrder>>(
- "updated_rows",
- |m: &GridRowsChangeset| { &m.updated_rows },
- |m: &mut GridRowsChangeset| { &mut m.updated_rows },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridRowsChangeset>(
- "GridRowsChangeset",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static GridRowsChangeset {
- static instance: ::protobuf::rt::LazyV2<GridRowsChangeset> = ::protobuf::rt::LazyV2::INIT;
- instance.get(GridRowsChangeset::new)
- }
-}
-
-impl ::protobuf::Clear for GridRowsChangeset {
- fn clear(&mut self) {
- self.block_id.clear();
- self.inserted_rows.clear();
- self.deleted_rows.clear();
- self.updated_rows.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for GridRowsChangeset {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for GridRowsChangeset {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct GridBlock {
- // message fields
- pub id: ::std::string::String,
- pub row_orders: ::protobuf::RepeatedField<RowOrder>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a GridBlock {
- fn default() -> &'a GridBlock {
- <GridBlock as ::protobuf::Message>::default_instance()
- }
-}
-
-impl GridBlock {
- pub fn new() -> GridBlock {
- ::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())
- }
-
- // repeated .RowOrder row_orders = 2;
-
-
- pub fn get_row_orders(&self) -> &[RowOrder] {
- &self.row_orders
- }
- pub fn clear_row_orders(&mut self) {
- self.row_orders.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_row_orders(&mut self, v: ::protobuf::RepeatedField<RowOrder>) {
- self.row_orders = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_row_orders(&mut self) -> &mut ::protobuf::RepeatedField<RowOrder> {
- &mut self.row_orders
- }
-
- // Take field
- pub fn take_row_orders(&mut self) -> ::protobuf::RepeatedField<RowOrder> {
- ::std::mem::replace(&mut self.row_orders, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for GridBlock {
- fn is_initialized(&self) -> bool {
- for v in &self.row_orders {
- 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_repeated_message_into(wire_type, is, &mut self.row_orders)?;
- },
- _ => {
- ::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);
- }
- for value in &self.row_orders {
- 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.id.is_empty() {
- os.write_string(1, &self.id)?;
- }
- for v in &self.row_orders {
- 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() -> GridBlock {
- GridBlock::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: &GridBlock| { &m.id },
- |m: &mut GridBlock| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RowOrder>>(
- "row_orders",
- |m: &GridBlock| { &m.row_orders },
- |m: &mut GridBlock| { &mut m.row_orders },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridBlock>(
- "GridBlock",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static GridBlock {
- static instance: ::protobuf::rt::LazyV2<GridBlock> = ::protobuf::rt::LazyV2::INIT;
- instance.get(GridBlock::new)
- }
-}
-
-impl ::protobuf::Clear for GridBlock {
- fn clear(&mut self) {
- self.id.clear();
- self.row_orders.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for GridBlock {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for GridBlock {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct Cell {
- // message fields
- pub field_id: ::std::string::String,
- pub data: ::std::vec::Vec<u8>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a Cell {
- fn default() -> &'a Cell {
- <Cell as ::protobuf::Message>::default_instance()
- }
-}
-
-impl Cell {
- pub fn new() -> Cell {
- ::std::default::Default::default()
- }
-
- // string field_id = 1;
-
-
- pub fn get_field_id(&self) -> &str {
- &self.field_id
- }
- pub fn clear_field_id(&mut self) {
- self.field_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.field_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- &mut self.field_id
- }
-
- // Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
- }
-
- // bytes data = 2;
-
-
- pub fn get_data(&self) -> &[u8] {
- &self.data
- }
- 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())
- }
-}
-
-impl ::protobuf::Message for Cell {
- 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_id)?;
- },
- 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_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.field_id);
- }
- 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_id.is_empty() {
- os.write_string(1, &self.field_id)?;
- }
- 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) -> &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() -> Cell {
- Cell::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>(
- "field_id",
- |m: &Cell| { &m.field_id },
- |m: &mut Cell| { &mut m.field_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "data",
- |m: &Cell| { &m.data },
- |m: &mut Cell| { &mut m.data },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<Cell>(
- "Cell",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static Cell {
- static instance: ::protobuf::rt::LazyV2<Cell> = ::protobuf::rt::LazyV2::INIT;
- instance.get(Cell::new)
- }
-}
-
-impl ::protobuf::Clear for Cell {
- fn clear(&mut self) {
- self.field_id.clear();
- self.data.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for Cell {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for Cell {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedCell {
- // message fields
- pub items: ::protobuf::RepeatedField<Cell>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedCell {
- fn default() -> &'a RepeatedCell {
- <RepeatedCell as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedCell {
- pub fn new() -> RepeatedCell {
- ::std::default::Default::default()
- }
-
- // repeated .Cell items = 1;
-
-
- pub fn get_items(&self) -> &[Cell] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Cell>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Cell> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Cell> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedCell {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- _ => {
- ::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.items {
- 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.items {
- 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) -> &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() -> RepeatedCell {
- RepeatedCell::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Cell>>(
- "items",
- |m: &RepeatedCell| { &m.items },
- |m: &mut RepeatedCell| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedCell>(
- "RepeatedCell",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedCell {
- static instance: ::protobuf::rt::LazyV2<RepeatedCell> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedCell::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedCell {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedCell {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedCell {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct CreateGridPayload {
- // message fields
- pub name: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a CreateGridPayload {
- fn default() -> &'a CreateGridPayload {
- <CreateGridPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl CreateGridPayload {
- pub fn new() -> CreateGridPayload {
- ::std::default::Default::default()
- }
-
- // string name = 1;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for CreateGridPayload {
- 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.name)?;
- },
- _ => {
- ::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.name.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.name);
- }
- 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.name.is_empty() {
- os.write_string(1, &self.name)?;
- }
- 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() -> CreateGridPayload {
- CreateGridPayload::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>(
- "name",
- |m: &CreateGridPayload| { &m.name },
- |m: &mut CreateGridPayload| { &mut m.name },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateGridPayload>(
- "CreateGridPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static CreateGridPayload {
- static instance: ::protobuf::rt::LazyV2<CreateGridPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(CreateGridPayload::new)
- }
-}
-
-impl ::protobuf::Clear for CreateGridPayload {
- fn clear(&mut self) {
- self.name.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for CreateGridPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for CreateGridPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct GridId {
- // 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 GridId {
- fn default() -> &'a GridId {
- <GridId as ::protobuf::Message>::default_instance()
- }
-}
-
-impl GridId {
- pub fn new() -> GridId {
- ::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 GridId {
- 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() -> GridId {
- GridId::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: &GridId| { &m.value },
- |m: &mut GridId| { &mut m.value },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridId>(
- "GridId",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static GridId {
- static instance: ::protobuf::rt::LazyV2<GridId> = ::protobuf::rt::LazyV2::INIT;
- instance.get(GridId::new)
- }
-}
-
-impl ::protobuf::Clear for GridId {
- fn clear(&mut self) {
- self.value.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for GridId {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for GridId {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct GridBlockId {
- // 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 GridBlockId {
- fn default() -> &'a GridBlockId {
- <GridBlockId as ::protobuf::Message>::default_instance()
- }
-}
-
-impl GridBlockId {
- pub fn new() -> GridBlockId {
- ::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 GridBlockId {
- 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() -> GridBlockId {
- GridBlockId::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: &GridBlockId| { &m.value },
- |m: &mut GridBlockId| { &mut m.value },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridBlockId>(
- "GridBlockId",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static GridBlockId {
- static instance: ::protobuf::rt::LazyV2<GridBlockId> = ::protobuf::rt::LazyV2::INIT;
- instance.get(GridBlockId::new)
- }
-}
-
-impl ::protobuf::Clear for GridBlockId {
- fn clear(&mut self) {
- self.value.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for GridBlockId {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for GridBlockId {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct CreateRowPayload {
- // message fields
- pub grid_id: ::std::string::String,
- // message oneof groups
- pub one_of_start_row_id: ::std::option::Option<CreateRowPayload_oneof_one_of_start_row_id>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a CreateRowPayload {
- fn default() -> &'a CreateRowPayload {
- <CreateRowPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum CreateRowPayload_oneof_one_of_start_row_id {
- start_row_id(::std::string::String),
-}
-
-impl CreateRowPayload {
- pub fn new() -> CreateRowPayload {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // string start_row_id = 2;
-
-
- pub fn get_start_row_id(&self) -> &str {
- match self.one_of_start_row_id {
- ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_start_row_id(&mut self) {
- self.one_of_start_row_id = ::std::option::Option::None;
- }
-
- pub fn has_start_row_id(&self) -> bool {
- match self.one_of_start_row_id {
- ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_start_row_id(&mut self, v: ::std::string::String) {
- self.one_of_start_row_id = ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_start_row_id(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(_)) = self.one_of_start_row_id {
- } else {
- self.one_of_start_row_id = ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(::std::string::String::new()));
- }
- match self.one_of_start_row_id {
- ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_start_row_id(&mut self) -> ::std::string::String {
- if self.has_start_row_id() {
- match self.one_of_start_row_id.take() {
- ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for CreateRowPayload {
- 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.grid_id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_start_row_id = ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(is.read_string()?));
- },
- _ => {
- ::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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_start_row_id {
- match v {
- &CreateRowPayload_oneof_one_of_start_row_id::start_row_id(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- 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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_start_row_id {
- match v {
- &CreateRowPayload_oneof_one_of_start_row_id::start_row_id(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- 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() -> CreateRowPayload {
- CreateRowPayload::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>(
- "grid_id",
- |m: &CreateRowPayload| { &m.grid_id },
- |m: &mut CreateRowPayload| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "start_row_id",
- CreateRowPayload::has_start_row_id,
- CreateRowPayload::get_start_row_id,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateRowPayload>(
- "CreateRowPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static CreateRowPayload {
- static instance: ::protobuf::rt::LazyV2<CreateRowPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(CreateRowPayload::new)
- }
-}
-
-impl ::protobuf::Clear for CreateRowPayload {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.one_of_start_row_id = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for CreateRowPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for CreateRowPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct QueryGridBlocksPayload {
- // message fields
- pub grid_id: ::std::string::String,
- pub block_orders: ::protobuf::RepeatedField<GridBlockOrder>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a QueryGridBlocksPayload {
- fn default() -> &'a QueryGridBlocksPayload {
- <QueryGridBlocksPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl QueryGridBlocksPayload {
- pub fn new() -> QueryGridBlocksPayload {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // repeated .GridBlockOrder block_orders = 2;
-
-
- pub fn get_block_orders(&self) -> &[GridBlockOrder] {
- &self.block_orders
- }
- pub fn clear_block_orders(&mut self) {
- self.block_orders.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_block_orders(&mut self, v: ::protobuf::RepeatedField<GridBlockOrder>) {
- self.block_orders = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_block_orders(&mut self) -> &mut ::protobuf::RepeatedField<GridBlockOrder> {
- &mut self.block_orders
- }
-
- // Take field
- pub fn take_block_orders(&mut self) -> ::protobuf::RepeatedField<GridBlockOrder> {
- ::std::mem::replace(&mut self.block_orders, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for QueryGridBlocksPayload {
- fn is_initialized(&self) -> bool {
- for v in &self.block_orders {
- 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.grid_id)?;
- },
- 2 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.block_orders)?;
- },
- _ => {
- ::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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- for value in &self.block_orders {
- 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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- for v in &self.block_orders {
- 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() -> QueryGridBlocksPayload {
- QueryGridBlocksPayload::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>(
- "grid_id",
- |m: &QueryGridBlocksPayload| { &m.grid_id },
- |m: &mut QueryGridBlocksPayload| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GridBlockOrder>>(
- "block_orders",
- |m: &QueryGridBlocksPayload| { &m.block_orders },
- |m: &mut QueryGridBlocksPayload| { &mut m.block_orders },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<QueryGridBlocksPayload>(
- "QueryGridBlocksPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static QueryGridBlocksPayload {
- static instance: ::protobuf::rt::LazyV2<QueryGridBlocksPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(QueryGridBlocksPayload::new)
- }
-}
-
-impl ::protobuf::Clear for QueryGridBlocksPayload {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.block_orders.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for QueryGridBlocksPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for QueryGridBlocksPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct MoveItemPayload {
- // message fields
- pub grid_id: ::std::string::String,
- pub item_id: ::std::string::String,
- pub from_index: i32,
- pub to_index: i32,
- pub ty: MoveItemType,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a MoveItemPayload {
- fn default() -> &'a MoveItemPayload {
- <MoveItemPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl MoveItemPayload {
- pub fn new() -> MoveItemPayload {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // string item_id = 2;
-
-
- pub fn get_item_id(&self) -> &str {
- &self.item_id
- }
- pub fn clear_item_id(&mut self) {
- self.item_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_item_id(&mut self, v: ::std::string::String) {
- self.item_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_item_id(&mut self) -> &mut ::std::string::String {
- &mut self.item_id
- }
-
- // Take field
- pub fn take_item_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.item_id, ::std::string::String::new())
- }
-
- // int32 from_index = 3;
-
-
- pub fn get_from_index(&self) -> i32 {
- self.from_index
- }
- pub fn clear_from_index(&mut self) {
- self.from_index = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_from_index(&mut self, v: i32) {
- self.from_index = v;
- }
-
- // int32 to_index = 4;
-
-
- pub fn get_to_index(&self) -> i32 {
- self.to_index
- }
- pub fn clear_to_index(&mut self) {
- self.to_index = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_to_index(&mut self, v: i32) {
- self.to_index = v;
- }
-
- // .MoveItemType ty = 5;
-
-
- pub fn get_ty(&self) -> MoveItemType {
- self.ty
- }
- pub fn clear_ty(&mut self) {
- self.ty = MoveItemType::MoveField;
- }
-
- // Param is passed by value, moved
- pub fn set_ty(&mut self, v: MoveItemType) {
- self.ty = v;
- }
-}
-
-impl ::protobuf::Message for MoveItemPayload {
- 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.grid_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.item_id)?;
- },
- 3 => {
- 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.from_index = 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_int32()?;
- self.to_index = tmp;
- },
- 5 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 5, &mut self.unknown_fields)?
- },
- _ => {
- ::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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if !self.item_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.item_id);
- }
- if self.from_index != 0 {
- my_size += ::protobuf::rt::value_size(3, self.from_index, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.to_index != 0 {
- my_size += ::protobuf::rt::value_size(4, self.to_index, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.ty != MoveItemType::MoveField {
- my_size += ::protobuf::rt::enum_size(5, self.ty);
- }
- 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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if !self.item_id.is_empty() {
- os.write_string(2, &self.item_id)?;
- }
- if self.from_index != 0 {
- os.write_int32(3, self.from_index)?;
- }
- if self.to_index != 0 {
- os.write_int32(4, self.to_index)?;
- }
- if self.ty != MoveItemType::MoveField {
- os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.ty))?;
- }
- 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() -> MoveItemPayload {
- MoveItemPayload::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>(
- "grid_id",
- |m: &MoveItemPayload| { &m.grid_id },
- |m: &mut MoveItemPayload| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "item_id",
- |m: &MoveItemPayload| { &m.item_id },
- |m: &mut MoveItemPayload| { &mut m.item_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "from_index",
- |m: &MoveItemPayload| { &m.from_index },
- |m: &mut MoveItemPayload| { &mut m.from_index },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "to_index",
- |m: &MoveItemPayload| { &m.to_index },
- |m: &mut MoveItemPayload| { &mut m.to_index },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<MoveItemType>>(
- "ty",
- |m: &MoveItemPayload| { &m.ty },
- |m: &mut MoveItemPayload| { &mut m.ty },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<MoveItemPayload>(
- "MoveItemPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static MoveItemPayload {
- static instance: ::protobuf::rt::LazyV2<MoveItemPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(MoveItemPayload::new)
- }
-}
-
-impl ::protobuf::Clear for MoveItemPayload {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.item_id.clear();
- self.from_index = 0;
- self.to_index = 0;
- self.ty = MoveItemType::MoveField;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for MoveItemPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for MoveItemPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct CellChangeset {
- // message fields
- pub grid_id: ::std::string::String,
- pub row_id: ::std::string::String,
- pub field_id: ::std::string::String,
- // message oneof groups
- pub one_of_cell_content_changeset: ::std::option::Option<CellChangeset_oneof_one_of_cell_content_changeset>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a CellChangeset {
- fn default() -> &'a CellChangeset {
- <CellChangeset as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum CellChangeset_oneof_one_of_cell_content_changeset {
- cell_content_changeset(::std::string::String),
-}
-
-impl CellChangeset {
- pub fn new() -> CellChangeset {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // string row_id = 2;
-
-
- pub fn get_row_id(&self) -> &str {
- &self.row_id
- }
- pub fn clear_row_id(&mut self) {
- self.row_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_row_id(&mut self, v: ::std::string::String) {
- self.row_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_row_id(&mut self) -> &mut ::std::string::String {
- &mut self.row_id
- }
-
- // Take field
- pub fn take_row_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.row_id, ::std::string::String::new())
- }
-
- // string field_id = 3;
-
-
- pub fn get_field_id(&self) -> &str {
- &self.field_id
- }
- pub fn clear_field_id(&mut self) {
- self.field_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.field_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- &mut self.field_id
- }
-
- // Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
- }
-
- // string cell_content_changeset = 4;
-
-
- pub fn get_cell_content_changeset(&self) -> &str {
- match self.one_of_cell_content_changeset {
- ::std::option::Option::Some(CellChangeset_oneof_one_of_cell_content_changeset::cell_content_changeset(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_cell_content_changeset(&mut self) {
- self.one_of_cell_content_changeset = ::std::option::Option::None;
- }
-
- pub fn has_cell_content_changeset(&self) -> bool {
- match self.one_of_cell_content_changeset {
- ::std::option::Option::Some(CellChangeset_oneof_one_of_cell_content_changeset::cell_content_changeset(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_cell_content_changeset(&mut self, v: ::std::string::String) {
- self.one_of_cell_content_changeset = ::std::option::Option::Some(CellChangeset_oneof_one_of_cell_content_changeset::cell_content_changeset(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_cell_content_changeset(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(CellChangeset_oneof_one_of_cell_content_changeset::cell_content_changeset(_)) = self.one_of_cell_content_changeset {
- } else {
- self.one_of_cell_content_changeset = ::std::option::Option::Some(CellChangeset_oneof_one_of_cell_content_changeset::cell_content_changeset(::std::string::String::new()));
- }
- match self.one_of_cell_content_changeset {
- ::std::option::Option::Some(CellChangeset_oneof_one_of_cell_content_changeset::cell_content_changeset(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_cell_content_changeset(&mut self) -> ::std::string::String {
- if self.has_cell_content_changeset() {
- match self.one_of_cell_content_changeset.take() {
- ::std::option::Option::Some(CellChangeset_oneof_one_of_cell_content_changeset::cell_content_changeset(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for CellChangeset {
- 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.grid_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.row_id)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_cell_content_changeset = ::std::option::Option::Some(CellChangeset_oneof_one_of_cell_content_changeset::cell_content_changeset(is.read_string()?));
- },
- _ => {
- ::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.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if !self.row_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.row_id);
- }
- if !self.field_id.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.field_id);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_cell_content_changeset {
- match v {
- &CellChangeset_oneof_one_of_cell_content_changeset::cell_content_changeset(ref v) => {
- my_size += ::protobuf::rt::string_size(4, &v);
- },
- };
- }
- 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.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if !self.row_id.is_empty() {
- os.write_string(2, &self.row_id)?;
- }
- if !self.field_id.is_empty() {
- os.write_string(3, &self.field_id)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_cell_content_changeset {
- match v {
- &CellChangeset_oneof_one_of_cell_content_changeset::cell_content_changeset(ref v) => {
- os.write_string(4, v)?;
- },
- };
- }
- 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() -> CellChangeset {
- CellChangeset::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>(
- "grid_id",
- |m: &CellChangeset| { &m.grid_id },
- |m: &mut CellChangeset| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "row_id",
- |m: &CellChangeset| { &m.row_id },
- |m: &mut CellChangeset| { &mut m.row_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "field_id",
- |m: &CellChangeset| { &m.field_id },
- |m: &mut CellChangeset| { &mut m.field_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "cell_content_changeset",
- CellChangeset::has_cell_content_changeset,
- CellChangeset::get_cell_content_changeset,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<CellChangeset>(
- "CellChangeset",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static CellChangeset {
- static instance: ::protobuf::rt::LazyV2<CellChangeset> = ::protobuf::rt::LazyV2::INIT;
- instance.get(CellChangeset::new)
- }
-}
-
-impl ::protobuf::Clear for CellChangeset {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.row_id.clear();
- self.field_id.clear();
- self.one_of_cell_content_changeset = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for CellChangeset {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for CellChangeset {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum MoveItemType {
- MoveField = 0,
- MoveRow = 1,
-}
-
-impl ::protobuf::ProtobufEnum for MoveItemType {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<MoveItemType> {
- match value {
- 0 => ::std::option::Option::Some(MoveItemType::MoveField),
- 1 => ::std::option::Option::Some(MoveItemType::MoveRow),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [MoveItemType] = &[
- MoveItemType::MoveField,
- MoveItemType::MoveRow,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<MoveItemType>("MoveItemType", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for MoveItemType {
-}
-
-impl ::std::default::Default for MoveItemType {
- fn default() -> Self {
- MoveItemType::MoveField
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for MoveItemType {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\ngrid.proto\x1a\x0bfield.proto\"z\n\x04Grid\x12\x0e\n\x02id\x18\x01\
- \x20\x01(\tR\x02id\x12.\n\x0cfield_orders\x18\x02\x20\x03(\x0b2\x0b.Fiel\
- dOrderR\x0bfieldOrders\x122\n\x0cblock_orders\x18\x03\x20\x03(\x0b2\x0f.\
- GridBlockOrderR\x0bblockOrders\"T\n\x08RowOrder\x12\x15\n\x06row_id\x18\
- \x01\x20\x01(\tR\x05rowId\x12\x19\n\x08block_id\x18\x02\x20\x01(\tR\x07b\
- lockId\x12\x16\n\x06height\x18\x03\x20\x01(\x05R\x06height\"\xb8\x01\n\
- \x03Row\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12@\n\x10cell_by_fiel\
- d_id\x18\x02\x20\x03(\x0b2\x17.Row.CellByFieldIdEntryR\rcellByFieldId\
- \x12\x16\n\x06height\x18\x03\x20\x01(\x05R\x06height\x1aG\n\x12CellByFie\
- ldIdEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x1b\n\x05value\
- \x18\x02\x20\x01(\x0b2\x05.CellR\x05value:\x028\x01\")\n\x0bRepeatedRow\
- \x12\x1a\n\x05items\x18\x01\x20\x03(\x0b2\x04.RowR\x05items\"5\n\x11Repe\
- atedGridBlock\x12\x20\n\x05items\x18\x01\x20\x03(\x0b2\n.GridBlockR\x05i\
- tems\"U\n\x0eGridBlockOrder\x12\x19\n\x08block_id\x18\x01\x20\x01(\tR\
- \x07blockId\x12(\n\nrow_orders\x18\x02\x20\x03(\x0b2\t.RowOrderR\trowOrd\
- ers\"_\n\rIndexRowOrder\x12&\n\trow_order\x18\x01\x20\x01(\x0b2\t.RowOrd\
- erR\x08rowOrder\x12\x16\n\x05index\x18\x02\x20\x01(\x05H\0R\x05indexB\
- \x0e\n\x0cone_of_index\"Q\n\x0fUpdatedRowOrder\x12&\n\trow_order\x18\x01\
- \x20\x01(\x0b2\t.RowOrderR\x08rowOrder\x12\x16\n\x03row\x18\x02\x20\x01(\
- \x0b2\x04.RowR\x03row\"\xc6\x01\n\x11GridRowsChangeset\x12\x19\n\x08bloc\
- k_id\x18\x01\x20\x01(\tR\x07blockId\x123\n\rinserted_rows\x18\x02\x20\
- \x03(\x0b2\x0e.IndexRowOrderR\x0cinsertedRows\x12,\n\x0cdeleted_rows\x18\
- \x03\x20\x03(\x0b2\t.RowOrderR\x0bdeletedRows\x123\n\x0cupdated_rows\x18\
- \x04\x20\x03(\x0b2\x10.UpdatedRowOrderR\x0bupdatedRows\"E\n\tGridBlock\
- \x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12(\n\nrow_orders\x18\x02\
- \x20\x03(\x0b2\t.RowOrderR\trowOrders\"5\n\x04Cell\x12\x19\n\x08field_id\
- \x18\x01\x20\x01(\tR\x07fieldId\x12\x12\n\x04data\x18\x02\x20\x01(\x0cR\
- \x04data\"+\n\x0cRepeatedCell\x12\x1b\n\x05items\x18\x01\x20\x03(\x0b2\
- \x05.CellR\x05items\"'\n\x11CreateGridPayload\x12\x12\n\x04name\x18\x01\
- \x20\x01(\tR\x04name\"\x1e\n\x06GridId\x12\x14\n\x05value\x18\x01\x20\
- \x01(\tR\x05value\"#\n\x0bGridBlockId\x12\x14\n\x05value\x18\x01\x20\x01\
- (\tR\x05value\"f\n\x10CreateRowPayload\x12\x17\n\x07grid_id\x18\x01\x20\
- \x01(\tR\x06gridId\x12\"\n\x0cstart_row_id\x18\x02\x20\x01(\tH\0R\nstart\
- RowIdB\x15\n\x13one_of_start_row_id\"e\n\x16QueryGridBlocksPayload\x12\
- \x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x122\n\x0cblock_orders\
- \x18\x02\x20\x03(\x0b2\x0f.GridBlockOrderR\x0bblockOrders\"\x9c\x01\n\
- \x0fMoveItemPayload\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\
- \x12\x17\n\x07item_id\x18\x02\x20\x01(\tR\x06itemId\x12\x1d\n\nfrom_inde\
- x\x18\x03\x20\x01(\x05R\tfromIndex\x12\x19\n\x08to_index\x18\x04\x20\x01\
- (\x05R\x07toIndex\x12\x1d\n\x02ty\x18\x05\x20\x01(\x0e2\r.MoveItemTypeR\
- \x02ty\"\xb3\x01\n\rCellChangeset\x12\x17\n\x07grid_id\x18\x01\x20\x01(\
- \tR\x06gridId\x12\x15\n\x06row_id\x18\x02\x20\x01(\tR\x05rowId\x12\x19\n\
- \x08field_id\x18\x03\x20\x01(\tR\x07fieldId\x126\n\x16cell_content_chang\
- eset\x18\x04\x20\x01(\tH\0R\x14cellContentChangesetB\x1f\n\x1done_of_cel\
- l_content_changeset**\n\x0cMoveItemType\x12\r\n\tMoveField\x10\0\x12\x0b\
- \n\x07MoveRow\x10\x01b\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()
- })
-}
diff --git a/shared-lib/flowy-grid-data-model/src/protobuf/model/grid_info.rs b/shared-lib/flowy-grid-data-model/src/protobuf/model/grid_info.rs
deleted file mode 100644
index 61fd1de2bd..0000000000
--- a/shared-lib/flowy-grid-data-model/src/protobuf/model/grid_info.rs
+++ /dev/null
@@ -1,1444 +0,0 @@
-// 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 `grid_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 ViewExtData {
- // message fields
- pub filter: ::protobuf::SingularPtrField<ViewFilter>,
- pub group: ::protobuf::SingularPtrField<ViewGroup>,
- pub sort: ::protobuf::SingularPtrField<ViewSort>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ViewExtData {
- fn default() -> &'a ViewExtData {
- <ViewExtData as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ViewExtData {
- pub fn new() -> ViewExtData {
- ::std::default::Default::default()
- }
-
- // .ViewFilter filter = 1;
-
-
- pub fn get_filter(&self) -> &ViewFilter {
- self.filter.as_ref().unwrap_or_else(|| <ViewFilter as ::protobuf::Message>::default_instance())
- }
- pub fn clear_filter(&mut self) {
- self.filter.clear();
- }
-
- pub fn has_filter(&self) -> bool {
- self.filter.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_filter(&mut self, v: ViewFilter) {
- self.filter = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_filter(&mut self) -> &mut ViewFilter {
- if self.filter.is_none() {
- self.filter.set_default();
- }
- self.filter.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_filter(&mut self) -> ViewFilter {
- self.filter.take().unwrap_or_else(|| ViewFilter::new())
- }
-
- // .ViewGroup group = 2;
-
-
- pub fn get_group(&self) -> &ViewGroup {
- self.group.as_ref().unwrap_or_else(|| <ViewGroup as ::protobuf::Message>::default_instance())
- }
- pub fn clear_group(&mut self) {
- self.group.clear();
- }
-
- pub fn has_group(&self) -> bool {
- self.group.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_group(&mut self, v: ViewGroup) {
- self.group = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_group(&mut self) -> &mut ViewGroup {
- if self.group.is_none() {
- self.group.set_default();
- }
- self.group.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_group(&mut self) -> ViewGroup {
- self.group.take().unwrap_or_else(|| ViewGroup::new())
- }
-
- // .ViewSort sort = 3;
-
-
- pub fn get_sort(&self) -> &ViewSort {
- self.sort.as_ref().unwrap_or_else(|| <ViewSort as ::protobuf::Message>::default_instance())
- }
- pub fn clear_sort(&mut self) {
- self.sort.clear();
- }
-
- pub fn has_sort(&self) -> bool {
- self.sort.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_sort(&mut self, v: ViewSort) {
- self.sort = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_sort(&mut self) -> &mut ViewSort {
- if self.sort.is_none() {
- self.sort.set_default();
- }
- self.sort.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_sort(&mut self) -> ViewSort {
- self.sort.take().unwrap_or_else(|| ViewSort::new())
- }
-}
-
-impl ::protobuf::Message for ViewExtData {
- fn is_initialized(&self) -> bool {
- for v in &self.filter {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.group {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.sort {
- 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.filter)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.group)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sort)?;
- },
- _ => {
- ::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.filter.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let Some(ref v) = self.group.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let Some(ref v) = self.sort.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.filter.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.group.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.sort.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)?;
- }
- 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() -> ViewExtData {
- ViewExtData::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewFilter>>(
- "filter",
- |m: &ViewExtData| { &m.filter },
- |m: &mut ViewExtData| { &mut m.filter },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewGroup>>(
- "group",
- |m: &ViewExtData| { &m.group },
- |m: &mut ViewExtData| { &mut m.group },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewSort>>(
- "sort",
- |m: &ViewExtData| { &m.sort },
- |m: &mut ViewExtData| { &mut m.sort },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewExtData>(
- "ViewExtData",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ViewExtData {
- static instance: ::protobuf::rt::LazyV2<ViewExtData> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewExtData::new)
- }
-}
-
-impl ::protobuf::Clear for ViewExtData {
- fn clear(&mut self) {
- self.filter.clear();
- self.group.clear();
- self.sort.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ViewExtData {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewExtData {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ViewFilter {
- // message oneof groups
- pub one_of_field_id: ::std::option::Option<ViewFilter_oneof_one_of_field_id>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ViewFilter {
- fn default() -> &'a ViewFilter {
- <ViewFilter as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum ViewFilter_oneof_one_of_field_id {
- field_id(::std::string::String),
-}
-
-impl ViewFilter {
- pub fn new() -> ViewFilter {
- ::std::default::Default::default()
- }
-
- // string field_id = 1;
-
-
- pub fn get_field_id(&self) -> &str {
- match self.one_of_field_id {
- ::std::option::Option::Some(ViewFilter_oneof_one_of_field_id::field_id(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_field_id(&mut self) {
- self.one_of_field_id = ::std::option::Option::None;
- }
-
- pub fn has_field_id(&self) -> bool {
- match self.one_of_field_id {
- ::std::option::Option::Some(ViewFilter_oneof_one_of_field_id::field_id(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.one_of_field_id = ::std::option::Option::Some(ViewFilter_oneof_one_of_field_id::field_id(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(ViewFilter_oneof_one_of_field_id::field_id(_)) = self.one_of_field_id {
- } else {
- self.one_of_field_id = ::std::option::Option::Some(ViewFilter_oneof_one_of_field_id::field_id(::std::string::String::new()));
- }
- match self.one_of_field_id {
- ::std::option::Option::Some(ViewFilter_oneof_one_of_field_id::field_id(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- if self.has_field_id() {
- match self.one_of_field_id.take() {
- ::std::option::Option::Some(ViewFilter_oneof_one_of_field_id::field_id(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for ViewFilter {
- 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::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_field_id = ::std::option::Option::Some(ViewFilter_oneof_one_of_field_id::field_id(is.read_string()?));
- },
- _ => {
- ::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.one_of_field_id {
- match v {
- &ViewFilter_oneof_one_of_field_id::field_id(ref v) => {
- my_size += ::protobuf::rt::string_size(1, &v);
- },
- };
- }
- 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.one_of_field_id {
- match v {
- &ViewFilter_oneof_one_of_field_id::field_id(ref v) => {
- os.write_string(1, v)?;
- },
- };
- }
- 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() -> ViewFilter {
- ViewFilter::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_singular_string_accessor::<_>(
- "field_id",
- ViewFilter::has_field_id,
- ViewFilter::get_field_id,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewFilter>(
- "ViewFilter",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ViewFilter {
- static instance: ::protobuf::rt::LazyV2<ViewFilter> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewFilter::new)
- }
-}
-
-impl ::protobuf::Clear for ViewFilter {
- fn clear(&mut self) {
- self.one_of_field_id = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ViewFilter {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewFilter {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ViewGroup {
- // message oneof groups
- pub one_of_group_field_id: ::std::option::Option<ViewGroup_oneof_one_of_group_field_id>,
- pub one_of_sub_group_field_id: ::std::option::Option<ViewGroup_oneof_one_of_sub_group_field_id>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ViewGroup {
- fn default() -> &'a ViewGroup {
- <ViewGroup as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum ViewGroup_oneof_one_of_group_field_id {
- group_field_id(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum ViewGroup_oneof_one_of_sub_group_field_id {
- sub_group_field_id(::std::string::String),
-}
-
-impl ViewGroup {
- pub fn new() -> ViewGroup {
- ::std::default::Default::default()
- }
-
- // string group_field_id = 1;
-
-
- pub fn get_group_field_id(&self) -> &str {
- match self.one_of_group_field_id {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_group_field_id::group_field_id(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_group_field_id(&mut self) {
- self.one_of_group_field_id = ::std::option::Option::None;
- }
-
- pub fn has_group_field_id(&self) -> bool {
- match self.one_of_group_field_id {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_group_field_id::group_field_id(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_group_field_id(&mut self, v: ::std::string::String) {
- self.one_of_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_group_field_id::group_field_id(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_group_field_id(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(ViewGroup_oneof_one_of_group_field_id::group_field_id(_)) = self.one_of_group_field_id {
- } else {
- self.one_of_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_group_field_id::group_field_id(::std::string::String::new()));
- }
- match self.one_of_group_field_id {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_group_field_id::group_field_id(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_group_field_id(&mut self) -> ::std::string::String {
- if self.has_group_field_id() {
- match self.one_of_group_field_id.take() {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_group_field_id::group_field_id(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string sub_group_field_id = 2;
-
-
- pub fn get_sub_group_field_id(&self) -> &str {
- match self.one_of_sub_group_field_id {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_sub_group_field_id(&mut self) {
- self.one_of_sub_group_field_id = ::std::option::Option::None;
- }
-
- pub fn has_sub_group_field_id(&self) -> bool {
- match self.one_of_sub_group_field_id {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_sub_group_field_id(&mut self, v: ::std::string::String) {
- self.one_of_sub_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_sub_group_field_id(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(_)) = self.one_of_sub_group_field_id {
- } else {
- self.one_of_sub_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(::std::string::String::new()));
- }
- match self.one_of_sub_group_field_id {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_sub_group_field_id(&mut self) -> ::std::string::String {
- if self.has_sub_group_field_id() {
- match self.one_of_sub_group_field_id.take() {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for ViewGroup {
- 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::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_group_field_id::group_field_id(is.read_string()?));
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_sub_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(is.read_string()?));
- },
- _ => {
- ::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.one_of_group_field_id {
- match v {
- &ViewGroup_oneof_one_of_group_field_id::group_field_id(ref v) => {
- my_size += ::protobuf::rt::string_size(1, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_sub_group_field_id {
- match v {
- &ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- 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.one_of_group_field_id {
- match v {
- &ViewGroup_oneof_one_of_group_field_id::group_field_id(ref v) => {
- os.write_string(1, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_sub_group_field_id {
- match v {
- &ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- 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() -> ViewGroup {
- ViewGroup::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_singular_string_accessor::<_>(
- "group_field_id",
- ViewGroup::has_group_field_id,
- ViewGroup::get_group_field_id,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "sub_group_field_id",
- ViewGroup::has_sub_group_field_id,
- ViewGroup::get_sub_group_field_id,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewGroup>(
- "ViewGroup",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ViewGroup {
- static instance: ::protobuf::rt::LazyV2<ViewGroup> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewGroup::new)
- }
-}
-
-impl ::protobuf::Clear for ViewGroup {
- fn clear(&mut self) {
- self.one_of_group_field_id = ::std::option::Option::None;
- self.one_of_sub_group_field_id = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ViewGroup {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewGroup {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ViewSort {
- // message oneof groups
- pub one_of_field_id: ::std::option::Option<ViewSort_oneof_one_of_field_id>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ViewSort {
- fn default() -> &'a ViewSort {
- <ViewSort as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum ViewSort_oneof_one_of_field_id {
- field_id(::std::string::String),
-}
-
-impl ViewSort {
- pub fn new() -> ViewSort {
- ::std::default::Default::default()
- }
-
- // string field_id = 1;
-
-
- pub fn get_field_id(&self) -> &str {
- match self.one_of_field_id {
- ::std::option::Option::Some(ViewSort_oneof_one_of_field_id::field_id(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_field_id(&mut self) {
- self.one_of_field_id = ::std::option::Option::None;
- }
-
- pub fn has_field_id(&self) -> bool {
- match self.one_of_field_id {
- ::std::option::Option::Some(ViewSort_oneof_one_of_field_id::field_id(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.one_of_field_id = ::std::option::Option::Some(ViewSort_oneof_one_of_field_id::field_id(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(ViewSort_oneof_one_of_field_id::field_id(_)) = self.one_of_field_id {
- } else {
- self.one_of_field_id = ::std::option::Option::Some(ViewSort_oneof_one_of_field_id::field_id(::std::string::String::new()));
- }
- match self.one_of_field_id {
- ::std::option::Option::Some(ViewSort_oneof_one_of_field_id::field_id(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- if self.has_field_id() {
- match self.one_of_field_id.take() {
- ::std::option::Option::Some(ViewSort_oneof_one_of_field_id::field_id(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for ViewSort {
- 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::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_field_id = ::std::option::Option::Some(ViewSort_oneof_one_of_field_id::field_id(is.read_string()?));
- },
- _ => {
- ::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.one_of_field_id {
- match v {
- &ViewSort_oneof_one_of_field_id::field_id(ref v) => {
- my_size += ::protobuf::rt::string_size(1, &v);
- },
- };
- }
- 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.one_of_field_id {
- match v {
- &ViewSort_oneof_one_of_field_id::field_id(ref v) => {
- os.write_string(1, v)?;
- },
- };
- }
- 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() -> ViewSort {
- ViewSort::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_singular_string_accessor::<_>(
- "field_id",
- ViewSort::has_field_id,
- ViewSort::get_field_id,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewSort>(
- "ViewSort",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ViewSort {
- static instance: ::protobuf::rt::LazyV2<ViewSort> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewSort::new)
- }
-}
-
-impl ::protobuf::Clear for ViewSort {
- fn clear(&mut self) {
- self.one_of_field_id = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ViewSort {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewSort {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct GridInfoChangesetPayload {
- // message fields
- pub grid_id: ::std::string::String,
- // message oneof groups
- pub one_of_filter: ::std::option::Option<GridInfoChangesetPayload_oneof_one_of_filter>,
- pub one_of_group: ::std::option::Option<GridInfoChangesetPayload_oneof_one_of_group>,
- pub one_of_sort: ::std::option::Option<GridInfoChangesetPayload_oneof_one_of_sort>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a GridInfoChangesetPayload {
- fn default() -> &'a GridInfoChangesetPayload {
- <GridInfoChangesetPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum GridInfoChangesetPayload_oneof_one_of_filter {
- filter(ViewFilter),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum GridInfoChangesetPayload_oneof_one_of_group {
- group(ViewGroup),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum GridInfoChangesetPayload_oneof_one_of_sort {
- sort(ViewSort),
-}
-
-impl GridInfoChangesetPayload {
- pub fn new() -> GridInfoChangesetPayload {
- ::std::default::Default::default()
- }
-
- // string grid_id = 1;
-
-
- pub fn get_grid_id(&self) -> &str {
- &self.grid_id
- }
- pub fn clear_grid_id(&mut self) {
- self.grid_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_grid_id(&mut self, v: ::std::string::String) {
- self.grid_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
- &mut self.grid_id
- }
-
- // Take field
- pub fn take_grid_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
- }
-
- // .ViewFilter filter = 2;
-
-
- pub fn get_filter(&self) -> &ViewFilter {
- match self.one_of_filter {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_filter::filter(ref v)) => v,
- _ => <ViewFilter as ::protobuf::Message>::default_instance(),
- }
- }
- pub fn clear_filter(&mut self) {
- self.one_of_filter = ::std::option::Option::None;
- }
-
- pub fn has_filter(&self) -> bool {
- match self.one_of_filter {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_filter::filter(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_filter(&mut self, v: ViewFilter) {
- self.one_of_filter = ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_filter::filter(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_filter(&mut self) -> &mut ViewFilter {
- if let ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_filter::filter(_)) = self.one_of_filter {
- } else {
- self.one_of_filter = ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_filter::filter(ViewFilter::new()));
- }
- match self.one_of_filter {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_filter::filter(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_filter(&mut self) -> ViewFilter {
- if self.has_filter() {
- match self.one_of_filter.take() {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_filter::filter(v)) => v,
- _ => panic!(),
- }
- } else {
- ViewFilter::new()
- }
- }
-
- // .ViewGroup group = 3;
-
-
- pub fn get_group(&self) -> &ViewGroup {
- match self.one_of_group {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_group::group(ref v)) => v,
- _ => <ViewGroup as ::protobuf::Message>::default_instance(),
- }
- }
- pub fn clear_group(&mut self) {
- self.one_of_group = ::std::option::Option::None;
- }
-
- pub fn has_group(&self) -> bool {
- match self.one_of_group {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_group::group(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_group(&mut self, v: ViewGroup) {
- self.one_of_group = ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_group::group(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_group(&mut self) -> &mut ViewGroup {
- if let ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_group::group(_)) = self.one_of_group {
- } else {
- self.one_of_group = ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_group::group(ViewGroup::new()));
- }
- match self.one_of_group {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_group::group(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_group(&mut self) -> ViewGroup {
- if self.has_group() {
- match self.one_of_group.take() {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_group::group(v)) => v,
- _ => panic!(),
- }
- } else {
- ViewGroup::new()
- }
- }
-
- // .ViewSort sort = 4;
-
-
- pub fn get_sort(&self) -> &ViewSort {
- match self.one_of_sort {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_sort::sort(ref v)) => v,
- _ => <ViewSort as ::protobuf::Message>::default_instance(),
- }
- }
- pub fn clear_sort(&mut self) {
- self.one_of_sort = ::std::option::Option::None;
- }
-
- pub fn has_sort(&self) -> bool {
- match self.one_of_sort {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_sort::sort(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_sort(&mut self, v: ViewSort) {
- self.one_of_sort = ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_sort::sort(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_sort(&mut self) -> &mut ViewSort {
- if let ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_sort::sort(_)) = self.one_of_sort {
- } else {
- self.one_of_sort = ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_sort::sort(ViewSort::new()));
- }
- match self.one_of_sort {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_sort::sort(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_sort(&mut self) -> ViewSort {
- if self.has_sort() {
- match self.one_of_sort.take() {
- ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_sort::sort(v)) => v,
- _ => panic!(),
- }
- } else {
- ViewSort::new()
- }
- }
-}
-
-impl ::protobuf::Message for GridInfoChangesetPayload {
- fn is_initialized(&self) -> bool {
- if let Some(GridInfoChangesetPayload_oneof_one_of_filter::filter(ref v)) = self.one_of_filter {
- if !v.is_initialized() {
- return false;
- }
- }
- if let Some(GridInfoChangesetPayload_oneof_one_of_group::group(ref v)) = self.one_of_group {
- if !v.is_initialized() {
- return false;
- }
- }
- if let Some(GridInfoChangesetPayload_oneof_one_of_sort::sort(ref v)) = self.one_of_sort {
- 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.grid_id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_filter = ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_filter::filter(is.read_message()?));
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_group = ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_group::group(is.read_message()?));
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_sort = ::std::option::Option::Some(GridInfoChangesetPayload_oneof_one_of_sort::sort(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 !self.grid_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.grid_id);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_filter {
- match v {
- &GridInfoChangesetPayload_oneof_one_of_filter::filter(ref v) => {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_group {
- match v {
- &GridInfoChangesetPayload_oneof_one_of_group::group(ref v) => {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_sort {
- match v {
- &GridInfoChangesetPayload_oneof_one_of_sort::sort(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 !self.grid_id.is_empty() {
- os.write_string(1, &self.grid_id)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_filter {
- match v {
- &GridInfoChangesetPayload_oneof_one_of_filter::filter(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)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_group {
- match v {
- &GridInfoChangesetPayload_oneof_one_of_group::group(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)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_sort {
- match v {
- &GridInfoChangesetPayload_oneof_one_of_sort::sort(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)?;
- },
- };
- }
- 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() -> GridInfoChangesetPayload {
- GridInfoChangesetPayload::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>(
- "grid_id",
- |m: &GridInfoChangesetPayload| { &m.grid_id },
- |m: &mut GridInfoChangesetPayload| { &mut m.grid_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ViewFilter>(
- "filter",
- GridInfoChangesetPayload::has_filter,
- GridInfoChangesetPayload::get_filter,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ViewGroup>(
- "group",
- GridInfoChangesetPayload::has_group,
- GridInfoChangesetPayload::get_group,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ViewSort>(
- "sort",
- GridInfoChangesetPayload::has_sort,
- GridInfoChangesetPayload::get_sort,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridInfoChangesetPayload>(
- "GridInfoChangesetPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static GridInfoChangesetPayload {
- static instance: ::protobuf::rt::LazyV2<GridInfoChangesetPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(GridInfoChangesetPayload::new)
- }
-}
-
-impl ::protobuf::Clear for GridInfoChangesetPayload {
- fn clear(&mut self) {
- self.grid_id.clear();
- self.one_of_filter = ::std::option::Option::None;
- self.one_of_group = ::std::option::Option::None;
- self.one_of_sort = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for GridInfoChangesetPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for GridInfoChangesetPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0fgrid_info.proto\"s\n\x0bViewExtData\x12#\n\x06filter\x18\x01\x20\
- \x01(\x0b2\x0b.ViewFilterR\x06filter\x12\x20\n\x05group\x18\x02\x20\x01(\
- \x0b2\n.ViewGroupR\x05group\x12\x1d\n\x04sort\x18\x03\x20\x01(\x0b2\t.Vi\
- ewSortR\x04sort\"<\n\nViewFilter\x12\x1b\n\x08field_id\x18\x01\x20\x01(\
- \tH\0R\x07fieldIdB\x11\n\x0fone_of_field_id\"\x98\x01\n\tViewGroup\x12&\
- \n\x0egroup_field_id\x18\x01\x20\x01(\tH\0R\x0cgroupFieldId\x12-\n\x12su\
- b_group_field_id\x18\x02\x20\x01(\tH\x01R\x0fsubGroupFieldIdB\x17\n\x15o\
- ne_of_group_field_idB\x1b\n\x19one_of_sub_group_field_id\":\n\x08ViewSor\
- t\x12\x1b\n\x08field_id\x18\x01\x20\x01(\tH\0R\x07fieldIdB\x11\n\x0fone_\
- of_field_id\"\xcf\x01\n\x18GridInfoChangesetPayload\x12\x17\n\x07grid_id\
- \x18\x01\x20\x01(\tR\x06gridId\x12%\n\x06filter\x18\x02\x20\x01(\x0b2\
- \x0b.ViewFilterH\0R\x06filter\x12\"\n\x05group\x18\x03\x20\x01(\x0b2\n.V\
- iewGroupH\x01R\x05group\x12\x1f\n\x04sort\x18\x04\x20\x01(\x0b2\t.ViewSo\
- rtH\x02R\x04sortB\x0f\n\rone_of_filterB\x0e\n\x0cone_of_groupB\r\n\x0bon\
- e_of_sortb\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()
- })
-}
diff --git a/shared-lib/flowy-grid-data-model/src/protobuf/model/mod.rs b/shared-lib/flowy-grid-data-model/src/protobuf/model/mod.rs
deleted file mode 100644
index 7f51b05b38..0000000000
--- a/shared-lib/flowy-grid-data-model/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod grid;
-pub use grid::*;
-
-mod grid_info;
-pub use grid_info::*;
-
-mod field;
-pub use field::*;
diff --git a/shared-lib/flowy-sync/src/protobuf/mod.rs b/shared-lib/flowy-sync/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/shared-lib/flowy-sync/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/shared-lib/flowy-sync/src/protobuf/model/folder_info.rs b/shared-lib/flowy-sync/src/protobuf/model/folder_info.rs
deleted file mode 100644
index af8d77948d..0000000000
--- a/shared-lib/flowy-sync/src/protobuf/model/folder_info.rs
+++ /dev/null
@@ -1,314 +0,0 @@
-// 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 `folder_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 FolderInfo {
- // message fields
- pub folder_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 FolderInfo {
- fn default() -> &'a FolderInfo {
- <FolderInfo as ::protobuf::Message>::default_instance()
- }
-}
-
-impl FolderInfo {
- pub fn new() -> FolderInfo {
- ::std::default::Default::default()
- }
-
- // string folder_id = 1;
-
-
- pub fn get_folder_id(&self) -> &str {
- &self.folder_id
- }
- pub fn clear_folder_id(&mut self) {
- self.folder_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_folder_id(&mut self, v: ::std::string::String) {
- self.folder_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_folder_id(&mut self) -> &mut ::std::string::String {
- &mut self.folder_id
- }
-
- // Take field
- pub fn take_folder_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.folder_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 FolderInfo {
- 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.folder_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.folder_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.folder_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.folder_id.is_empty() {
- os.write_string(1, &self.folder_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() -> FolderInfo {
- FolderInfo::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>(
- "folder_id",
- |m: &FolderInfo| { &m.folder_id },
- |m: &mut FolderInfo| { &mut m.folder_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "text",
- |m: &FolderInfo| { &m.text },
- |m: &mut FolderInfo| { &mut m.text },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "rev_id",
- |m: &FolderInfo| { &m.rev_id },
- |m: &mut FolderInfo| { &mut m.rev_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "base_rev_id",
- |m: &FolderInfo| { &m.base_rev_id },
- |m: &mut FolderInfo| { &mut m.base_rev_id },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<FolderInfo>(
- "FolderInfo",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static FolderInfo {
- static instance: ::protobuf::rt::LazyV2<FolderInfo> = ::protobuf::rt::LazyV2::INIT;
- instance.get(FolderInfo::new)
- }
-}
-
-impl ::protobuf::Clear for FolderInfo {
- fn clear(&mut self) {
- self.folder_id.clear();
- self.text.clear();
- self.rev_id = 0;
- self.base_rev_id = 0;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for FolderInfo {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for FolderInfo {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x11folder_info.proto\"t\n\nFolderInfo\x12\x1b\n\tfolder_id\x18\x01\
- \x20\x01(\tR\x08folderId\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_re\
- v_id\x18\x04\x20\x01(\x03R\tbaseRevIdb\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()
- })
-}
diff --git a/shared-lib/flowy-sync/src/protobuf/model/mod.rs b/shared-lib/flowy-sync/src/protobuf/model/mod.rs
deleted file mode 100644
index d0627984e3..0000000000
--- a/shared-lib/flowy-sync/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod folder_info;
-pub use folder_info::*;
-
-mod ws_data;
-pub use ws_data::*;
-
-mod text_block_info;
-pub use text_block_info::*;
-
-mod revision;
-pub use revision::*;
diff --git a/shared-lib/flowy-sync/src/protobuf/model/revision.rs b/shared-lib/flowy-sync/src/protobuf/model/revision.rs
deleted file mode 100644
index 02d1f522cf..0000000000
--- a/shared-lib/flowy-sync/src/protobuf/model/revision.rs
+++ /dev/null
@@ -1,992 +0,0 @@
-// 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 `revision.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 Revision {
- // message fields
- pub base_rev_id: i64,
- pub rev_id: i64,
- pub delta_data: ::std::vec::Vec<u8>,
- pub md5: ::std::string::String,
- pub object_id: ::std::string::String,
- pub ty: RevType,
- pub user_id: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a Revision {
- fn default() -> &'a Revision {
- <Revision as ::protobuf::Message>::default_instance()
- }
-}
-
-impl Revision {
- pub fn new() -> Revision {
- ::std::default::Default::default()
- }
-
- // int64 base_rev_id = 1;
-
-
- 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;
- }
-
- // 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;
- }
-
- // bytes delta_data = 3;
-
-
- pub fn get_delta_data(&self) -> &[u8] {
- &self.delta_data
- }
- pub fn clear_delta_data(&mut self) {
- self.delta_data.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_delta_data(&mut self, v: ::std::vec::Vec<u8>) {
- self.delta_data = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_delta_data(&mut self) -> &mut ::std::vec::Vec<u8> {
- &mut self.delta_data
- }
-
- // Take field
- pub fn take_delta_data(&mut self) -> ::std::vec::Vec<u8> {
- ::std::mem::replace(&mut self.delta_data, ::std::vec::Vec::new())
- }
-
- // string md5 = 4;
-
-
- pub fn get_md5(&self) -> &str {
- &self.md5
- }
- pub fn clear_md5(&mut self) {
- self.md5.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_md5(&mut self, v: ::std::string::String) {
- self.md5 = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_md5(&mut self) -> &mut ::std::string::String {
- &mut self.md5
- }
-
- // Take field
- pub fn take_md5(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.md5, ::std::string::String::new())
- }
-
- // string object_id = 5;
-
-
- pub fn get_object_id(&self) -> &str {
- &self.object_id
- }
- pub fn clear_object_id(&mut self) {
- self.object_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_object_id(&mut self, v: ::std::string::String) {
- self.object_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_object_id(&mut self) -> &mut ::std::string::String {
- &mut self.object_id
- }
-
- // Take field
- pub fn take_object_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.object_id, ::std::string::String::new())
- }
-
- // .RevType ty = 6;
-
-
- pub fn get_ty(&self) -> RevType {
- self.ty
- }
- pub fn clear_ty(&mut self) {
- self.ty = RevType::DeprecatedLocal;
- }
-
- // Param is passed by value, moved
- pub fn set_ty(&mut self, v: RevType) {
- self.ty = v;
- }
-
- // string user_id = 7;
-
-
- 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())
- }
-}
-
-impl ::protobuf::Message for Revision {
- 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.base_rev_id = 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.rev_id = tmp;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.delta_data)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.md5)?;
- },
- 5 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.object_id)?;
- },
- 6 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 6, &mut self.unknown_fields)?
- },
- 7 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.user_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.base_rev_id != 0 {
- my_size += ::protobuf::rt::value_size(1, self.base_rev_id, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.rev_id != 0 {
- my_size += ::protobuf::rt::value_size(2, self.rev_id, ::protobuf::wire_format::WireTypeVarint);
- }
- if !self.delta_data.is_empty() {
- my_size += ::protobuf::rt::bytes_size(3, &self.delta_data);
- }
- if !self.md5.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.md5);
- }
- if !self.object_id.is_empty() {
- my_size += ::protobuf::rt::string_size(5, &self.object_id);
- }
- if self.ty != RevType::DeprecatedLocal {
- my_size += ::protobuf::rt::enum_size(6, self.ty);
- }
- if !self.user_id.is_empty() {
- my_size += ::protobuf::rt::string_size(7, &self.user_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.base_rev_id != 0 {
- os.write_int64(1, self.base_rev_id)?;
- }
- if self.rev_id != 0 {
- os.write_int64(2, self.rev_id)?;
- }
- if !self.delta_data.is_empty() {
- os.write_bytes(3, &self.delta_data)?;
- }
- if !self.md5.is_empty() {
- os.write_string(4, &self.md5)?;
- }
- if !self.object_id.is_empty() {
- os.write_string(5, &self.object_id)?;
- }
- if self.ty != RevType::DeprecatedLocal {
- os.write_enum(6, ::protobuf::ProtobufEnum::value(&self.ty))?;
- }
- if !self.user_id.is_empty() {
- os.write_string(7, &self.user_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() -> Revision {
- Revision::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::ProtobufTypeInt64>(
- "base_rev_id",
- |m: &Revision| { &m.base_rev_id },
- |m: &mut Revision| { &mut m.base_rev_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "rev_id",
- |m: &Revision| { &m.rev_id },
- |m: &mut Revision| { &mut m.rev_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "delta_data",
- |m: &Revision| { &m.delta_data },
- |m: &mut Revision| { &mut m.delta_data },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "md5",
- |m: &Revision| { &m.md5 },
- |m: &mut Revision| { &mut m.md5 },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "object_id",
- |m: &Revision| { &m.object_id },
- |m: &mut Revision| { &mut m.object_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RevType>>(
- "ty",
- |m: &Revision| { &m.ty },
- |m: &mut Revision| { &mut m.ty },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "user_id",
- |m: &Revision| { &m.user_id },
- |m: &mut Revision| { &mut m.user_id },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<Revision>(
- "Revision",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static Revision {
- static instance: ::protobuf::rt::LazyV2<Revision> = ::protobuf::rt::LazyV2::INIT;
- instance.get(Revision::new)
- }
-}
-
-impl ::protobuf::Clear for Revision {
- fn clear(&mut self) {
- self.base_rev_id = 0;
- self.rev_id = 0;
- self.delta_data.clear();
- self.md5.clear();
- self.object_id.clear();
- self.ty = RevType::DeprecatedLocal;
- self.user_id.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for Revision {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for Revision {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedRevision {
- // message fields
- pub items: ::protobuf::RepeatedField<Revision>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedRevision {
- fn default() -> &'a RepeatedRevision {
- <RepeatedRevision as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedRevision {
- pub fn new() -> RepeatedRevision {
- ::std::default::Default::default()
- }
-
- // repeated .Revision items = 1;
-
-
- pub fn get_items(&self) -> &[Revision] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Revision>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Revision> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Revision> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedRevision {
- fn is_initialized(&self) -> bool {
- for v in &self.items {
- 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.items)?;
- },
- _ => {
- ::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.items {
- 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.items {
- 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) -> &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() -> RepeatedRevision {
- RepeatedRevision::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Revision>>(
- "items",
- |m: &RepeatedRevision| { &m.items },
- |m: &mut RepeatedRevision| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedRevision>(
- "RepeatedRevision",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedRevision {
- static instance: ::protobuf::rt::LazyV2<RepeatedRevision> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedRevision::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedRevision {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedRevision {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedRevision {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RevId {
- // message fields
- pub value: i64,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RevId {
- fn default() -> &'a RevId {
- <RevId as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RevId {
- pub fn new() -> RevId {
- ::std::default::Default::default()
- }
-
- // int64 value = 1;
-
-
- pub fn get_value(&self) -> i64 {
- self.value
- }
- pub fn clear_value(&mut self) {
- self.value = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_value(&mut self, v: i64) {
- self.value = v;
- }
-}
-
-impl ::protobuf::Message for RevId {
- 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.value = 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.value != 0 {
- my_size += ::protobuf::rt::value_size(1, self.value, ::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.value != 0 {
- os.write_int64(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() -> RevId {
- RevId::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::ProtobufTypeInt64>(
- "value",
- |m: &RevId| { &m.value },
- |m: &mut RevId| { &mut m.value },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RevId>(
- "RevId",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RevId {
- static instance: ::protobuf::rt::LazyV2<RevId> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RevId::new)
- }
-}
-
-impl ::protobuf::Clear for RevId {
- fn clear(&mut self) {
- self.value = 0;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RevId {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RevId {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct RevisionRange {
- // message fields
- pub start: i64,
- pub end: i64,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RevisionRange {
- fn default() -> &'a RevisionRange {
- <RevisionRange as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RevisionRange {
- pub fn new() -> RevisionRange {
- ::std::default::Default::default()
- }
-
- // int64 start = 1;
-
-
- pub fn get_start(&self) -> i64 {
- self.start
- }
- pub fn clear_start(&mut self) {
- self.start = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_start(&mut self, v: i64) {
- self.start = v;
- }
-
- // int64 end = 2;
-
-
- pub fn get_end(&self) -> i64 {
- self.end
- }
- pub fn clear_end(&mut self) {
- self.end = 0;
- }
-
- // Param is passed by value, moved
- pub fn set_end(&mut self, v: i64) {
- self.end = v;
- }
-}
-
-impl ::protobuf::Message for RevisionRange {
- 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.start = 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.end = 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.start != 0 {
- my_size += ::protobuf::rt::value_size(1, self.start, ::protobuf::wire_format::WireTypeVarint);
- }
- if self.end != 0 {
- my_size += ::protobuf::rt::value_size(2, self.end, ::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.start != 0 {
- os.write_int64(1, self.start)?;
- }
- if self.end != 0 {
- os.write_int64(2, self.end)?;
- }
- 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() -> RevisionRange {
- RevisionRange::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::ProtobufTypeInt64>(
- "start",
- |m: &RevisionRange| { &m.start },
- |m: &mut RevisionRange| { &mut m.start },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "end",
- |m: &RevisionRange| { &m.end },
- |m: &mut RevisionRange| { &mut m.end },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RevisionRange>(
- "RevisionRange",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RevisionRange {
- static instance: ::protobuf::rt::LazyV2<RevisionRange> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RevisionRange::new)
- }
-}
-
-impl ::protobuf::Clear for RevisionRange {
- fn clear(&mut self) {
- self.start = 0;
- self.end = 0;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RevisionRange {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RevisionRange {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum RevType {
- DeprecatedLocal = 0,
- DeprecatedRemote = 1,
-}
-
-impl ::protobuf::ProtobufEnum for RevType {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<RevType> {
- match value {
- 0 => ::std::option::Option::Some(RevType::DeprecatedLocal),
- 1 => ::std::option::Option::Some(RevType::DeprecatedRemote),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [RevType] = &[
- RevType::DeprecatedLocal,
- RevType::DeprecatedRemote,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<RevType>("RevType", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for RevType {
-}
-
-impl ::std::default::Default for RevType {
- fn default() -> Self {
- RevType::DeprecatedLocal
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RevType {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0erevision.proto\"\xc2\x01\n\x08Revision\x12\x1e\n\x0bbase_rev_id\
- \x18\x01\x20\x01(\x03R\tbaseRevId\x12\x15\n\x06rev_id\x18\x02\x20\x01(\
- \x03R\x05revId\x12\x1d\n\ndelta_data\x18\x03\x20\x01(\x0cR\tdeltaData\
- \x12\x10\n\x03md5\x18\x04\x20\x01(\tR\x03md5\x12\x1b\n\tobject_id\x18\
- \x05\x20\x01(\tR\x08objectId\x12\x18\n\x02ty\x18\x06\x20\x01(\x0e2\x08.R\
- evTypeR\x02ty\x12\x17\n\x07user_id\x18\x07\x20\x01(\tR\x06userId\"3\n\
- \x10RepeatedRevision\x12\x1f\n\x05items\x18\x01\x20\x03(\x0b2\t.Revision\
- R\x05items\"\x1d\n\x05RevId\x12\x14\n\x05value\x18\x01\x20\x01(\x03R\x05\
- value\"7\n\rRevisionRange\x12\x14\n\x05start\x18\x01\x20\x01(\x03R\x05st\
- art\x12\x10\n\x03end\x18\x02\x20\x01(\x03R\x03end*4\n\x07RevType\x12\x13\
- \n\x0fDeprecatedLocal\x10\0\x12\x14\n\x10DeprecatedRemote\x10\x01b\x06pr\
- oto3\
-";
-
-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()
- })
-}
diff --git a/shared-lib/flowy-sync/src/protobuf/model/text_block_info.rs b/shared-lib/flowy-sync/src/protobuf/model/text_block_info.rs
deleted file mode 100644
index 1e44767a92..0000000000
--- a/shared-lib/flowy-sync/src/protobuf/model/text_block_info.rs
+++ /dev/null
@@ -1,1352 +0,0 @@
-// 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()
- })
-}
diff --git a/shared-lib/flowy-sync/src/protobuf/model/ws_data.rs b/shared-lib/flowy-sync/src/protobuf/model/ws_data.rs
deleted file mode 100644
index e1c8d8a1fa..0000000000
--- a/shared-lib/flowy-sync/src/protobuf/model/ws_data.rs
+++ /dev/null
@@ -1,923 +0,0 @@
-// 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 `ws_data.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 ClientRevisionWSData {
- // message fields
- pub object_id: ::std::string::String,
- pub ty: ClientRevisionWSDataType,
- pub revisions: ::protobuf::SingularPtrField<super::revision::RepeatedRevision>,
- pub data_id: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ClientRevisionWSData {
- fn default() -> &'a ClientRevisionWSData {
- <ClientRevisionWSData as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ClientRevisionWSData {
- pub fn new() -> ClientRevisionWSData {
- ::std::default::Default::default()
- }
-
- // string object_id = 1;
-
-
- pub fn get_object_id(&self) -> &str {
- &self.object_id
- }
- pub fn clear_object_id(&mut self) {
- self.object_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_object_id(&mut self, v: ::std::string::String) {
- self.object_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_object_id(&mut self) -> &mut ::std::string::String {
- &mut self.object_id
- }
-
- // Take field
- pub fn take_object_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.object_id, ::std::string::String::new())
- }
-
- // .ClientRevisionWSDataType ty = 2;
-
-
- pub fn get_ty(&self) -> ClientRevisionWSDataType {
- self.ty
- }
- pub fn clear_ty(&mut self) {
- self.ty = ClientRevisionWSDataType::ClientPushRev;
- }
-
- // Param is passed by value, moved
- pub fn set_ty(&mut self, v: ClientRevisionWSDataType) {
- self.ty = v;
- }
-
- // .RepeatedRevision revisions = 3;
-
-
- 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())
- }
-
- // string data_id = 4;
-
-
- pub fn get_data_id(&self) -> &str {
- &self.data_id
- }
- pub fn clear_data_id(&mut self) {
- self.data_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_data_id(&mut self, v: ::std::string::String) {
- self.data_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_data_id(&mut self) -> &mut ::std::string::String {
- &mut self.data_id
- }
-
- // Take field
- pub fn take_data_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.data_id, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for ClientRevisionWSData {
- 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.object_id)?;
- },
- 2 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 2, &mut self.unknown_fields)?
- },
- 3 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.revisions)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.data_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.object_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.object_id);
- }
- if self.ty != ClientRevisionWSDataType::ClientPushRev {
- my_size += ::protobuf::rt::enum_size(2, self.ty);
- }
- 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;
- }
- if !self.data_id.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.data_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.object_id.is_empty() {
- os.write_string(1, &self.object_id)?;
- }
- if self.ty != ClientRevisionWSDataType::ClientPushRev {
- os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.ty))?;
- }
- if let Some(ref v) = self.revisions.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.data_id.is_empty() {
- os.write_string(4, &self.data_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() -> ClientRevisionWSData {
- ClientRevisionWSData::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>(
- "object_id",
- |m: &ClientRevisionWSData| { &m.object_id },
- |m: &mut ClientRevisionWSData| { &mut m.object_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ClientRevisionWSDataType>>(
- "ty",
- |m: &ClientRevisionWSData| { &m.ty },
- |m: &mut ClientRevisionWSData| { &mut m.ty },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::revision::RepeatedRevision>>(
- "revisions",
- |m: &ClientRevisionWSData| { &m.revisions },
- |m: &mut ClientRevisionWSData| { &mut m.revisions },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "data_id",
- |m: &ClientRevisionWSData| { &m.data_id },
- |m: &mut ClientRevisionWSData| { &mut m.data_id },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ClientRevisionWSData>(
- "ClientRevisionWSData",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ClientRevisionWSData {
- static instance: ::protobuf::rt::LazyV2<ClientRevisionWSData> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ClientRevisionWSData::new)
- }
-}
-
-impl ::protobuf::Clear for ClientRevisionWSData {
- fn clear(&mut self) {
- self.object_id.clear();
- self.ty = ClientRevisionWSDataType::ClientPushRev;
- self.revisions.clear();
- self.data_id.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ClientRevisionWSData {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ClientRevisionWSData {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ServerRevisionWSData {
- // message fields
- pub object_id: ::std::string::String,
- pub ty: ServerRevisionWSDataType,
- pub data: ::std::vec::Vec<u8>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ServerRevisionWSData {
- fn default() -> &'a ServerRevisionWSData {
- <ServerRevisionWSData as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ServerRevisionWSData {
- pub fn new() -> ServerRevisionWSData {
- ::std::default::Default::default()
- }
-
- // string object_id = 1;
-
-
- pub fn get_object_id(&self) -> &str {
- &self.object_id
- }
- pub fn clear_object_id(&mut self) {
- self.object_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_object_id(&mut self, v: ::std::string::String) {
- self.object_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_object_id(&mut self) -> &mut ::std::string::String {
- &mut self.object_id
- }
-
- // Take field
- pub fn take_object_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.object_id, ::std::string::String::new())
- }
-
- // .ServerRevisionWSDataType ty = 2;
-
-
- pub fn get_ty(&self) -> ServerRevisionWSDataType {
- self.ty
- }
- pub fn clear_ty(&mut self) {
- self.ty = ServerRevisionWSDataType::ServerAck;
- }
-
- // Param is passed by value, moved
- pub fn set_ty(&mut self, v: ServerRevisionWSDataType) {
- self.ty = v;
- }
-
- // bytes data = 3;
-
-
- pub fn get_data(&self) -> &[u8] {
- &self.data
- }
- 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())
- }
-}
-
-impl ::protobuf::Message for ServerRevisionWSData {
- 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.object_id)?;
- },
- 2 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 2, &mut self.unknown_fields)?
- },
- 3 => {
- ::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.object_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.object_id);
- }
- if self.ty != ServerRevisionWSDataType::ServerAck {
- my_size += ::protobuf::rt::enum_size(2, self.ty);
- }
- if !self.data.is_empty() {
- my_size += ::protobuf::rt::bytes_size(3, &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.object_id.is_empty() {
- os.write_string(1, &self.object_id)?;
- }
- if self.ty != ServerRevisionWSDataType::ServerAck {
- os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.ty))?;
- }
- if !self.data.is_empty() {
- os.write_bytes(3, &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) -> &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() -> ServerRevisionWSData {
- ServerRevisionWSData::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>(
- "object_id",
- |m: &ServerRevisionWSData| { &m.object_id },
- |m: &mut ServerRevisionWSData| { &mut m.object_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ServerRevisionWSDataType>>(
- "ty",
- |m: &ServerRevisionWSData| { &m.ty },
- |m: &mut ServerRevisionWSData| { &mut m.ty },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "data",
- |m: &ServerRevisionWSData| { &m.data },
- |m: &mut ServerRevisionWSData| { &mut m.data },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ServerRevisionWSData>(
- "ServerRevisionWSData",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ServerRevisionWSData {
- static instance: ::protobuf::rt::LazyV2<ServerRevisionWSData> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ServerRevisionWSData::new)
- }
-}
-
-impl ::protobuf::Clear for ServerRevisionWSData {
- fn clear(&mut self) {
- self.object_id.clear();
- self.ty = ServerRevisionWSDataType::ServerAck;
- self.data.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ServerRevisionWSData {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ServerRevisionWSData {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct NewDocumentUser {
- // message fields
- pub user_id: ::std::string::String,
- pub doc_id: ::std::string::String,
- pub revision_data: ::std::vec::Vec<u8>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a NewDocumentUser {
- fn default() -> &'a NewDocumentUser {
- <NewDocumentUser as ::protobuf::Message>::default_instance()
- }
-}
-
-impl NewDocumentUser {
- pub fn new() -> NewDocumentUser {
- ::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())
- }
-
- // string doc_id = 2;
-
-
- 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())
- }
-
- // bytes revision_data = 3;
-
-
- pub fn get_revision_data(&self) -> &[u8] {
- &self.revision_data
- }
- pub fn clear_revision_data(&mut self) {
- self.revision_data.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_revision_data(&mut self, v: ::std::vec::Vec<u8>) {
- self.revision_data = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_revision_data(&mut self) -> &mut ::std::vec::Vec<u8> {
- &mut self.revision_data
- }
-
- // Take field
- pub fn take_revision_data(&mut self) -> ::std::vec::Vec<u8> {
- ::std::mem::replace(&mut self.revision_data, ::std::vec::Vec::new())
- }
-}
-
-impl ::protobuf::Message for NewDocumentUser {
- 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 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.doc_id)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.revision_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.user_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.user_id);
- }
- if !self.doc_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.doc_id);
- }
- if !self.revision_data.is_empty() {
- my_size += ::protobuf::rt::bytes_size(3, &self.revision_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.user_id.is_empty() {
- os.write_string(1, &self.user_id)?;
- }
- if !self.doc_id.is_empty() {
- os.write_string(2, &self.doc_id)?;
- }
- if !self.revision_data.is_empty() {
- os.write_bytes(3, &self.revision_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) -> &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() -> NewDocumentUser {
- NewDocumentUser::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: &NewDocumentUser| { &m.user_id },
- |m: &mut NewDocumentUser| { &mut m.user_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "doc_id",
- |m: &NewDocumentUser| { &m.doc_id },
- |m: &mut NewDocumentUser| { &mut m.doc_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "revision_data",
- |m: &NewDocumentUser| { &m.revision_data },
- |m: &mut NewDocumentUser| { &mut m.revision_data },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<NewDocumentUser>(
- "NewDocumentUser",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static NewDocumentUser {
- static instance: ::protobuf::rt::LazyV2<NewDocumentUser> = ::protobuf::rt::LazyV2::INIT;
- instance.get(NewDocumentUser::new)
- }
-}
-
-impl ::protobuf::Clear for NewDocumentUser {
- fn clear(&mut self) {
- self.user_id.clear();
- self.doc_id.clear();
- self.revision_data.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for NewDocumentUser {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for NewDocumentUser {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum ClientRevisionWSDataType {
- ClientPushRev = 0,
- ClientPing = 1,
-}
-
-impl ::protobuf::ProtobufEnum for ClientRevisionWSDataType {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<ClientRevisionWSDataType> {
- match value {
- 0 => ::std::option::Option::Some(ClientRevisionWSDataType::ClientPushRev),
- 1 => ::std::option::Option::Some(ClientRevisionWSDataType::ClientPing),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [ClientRevisionWSDataType] = &[
- ClientRevisionWSDataType::ClientPushRev,
- ClientRevisionWSDataType::ClientPing,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<ClientRevisionWSDataType>("ClientRevisionWSDataType", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for ClientRevisionWSDataType {
-}
-
-impl ::std::default::Default for ClientRevisionWSDataType {
- fn default() -> Self {
- ClientRevisionWSDataType::ClientPushRev
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ClientRevisionWSDataType {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum ServerRevisionWSDataType {
- ServerAck = 0,
- ServerPushRev = 1,
- ServerPullRev = 2,
- UserConnect = 3,
-}
-
-impl ::protobuf::ProtobufEnum for ServerRevisionWSDataType {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<ServerRevisionWSDataType> {
- match value {
- 0 => ::std::option::Option::Some(ServerRevisionWSDataType::ServerAck),
- 1 => ::std::option::Option::Some(ServerRevisionWSDataType::ServerPushRev),
- 2 => ::std::option::Option::Some(ServerRevisionWSDataType::ServerPullRev),
- 3 => ::std::option::Option::Some(ServerRevisionWSDataType::UserConnect),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [ServerRevisionWSDataType] = &[
- ServerRevisionWSDataType::ServerAck,
- ServerRevisionWSDataType::ServerPushRev,
- ServerRevisionWSDataType::ServerPullRev,
- ServerRevisionWSDataType::UserConnect,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<ServerRevisionWSDataType>("ServerRevisionWSDataType", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for ServerRevisionWSDataType {
-}
-
-impl ::std::default::Default for ServerRevisionWSDataType {
- fn default() -> Self {
- ServerRevisionWSDataType::ServerAck
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ServerRevisionWSDataType {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\rws_data.proto\x1a\x0erevision.proto\"\xa8\x01\n\x14ClientRevisionWSD\
- ata\x12\x1b\n\tobject_id\x18\x01\x20\x01(\tR\x08objectId\x12)\n\x02ty\
- \x18\x02\x20\x01(\x0e2\x19.ClientRevisionWSDataTypeR\x02ty\x12/\n\trevis\
- ions\x18\x03\x20\x01(\x0b2\x11.RepeatedRevisionR\trevisions\x12\x17\n\
- \x07data_id\x18\x04\x20\x01(\tR\x06dataId\"r\n\x14ServerRevisionWSData\
- \x12\x1b\n\tobject_id\x18\x01\x20\x01(\tR\x08objectId\x12)\n\x02ty\x18\
- \x02\x20\x01(\x0e2\x19.ServerRevisionWSDataTypeR\x02ty\x12\x12\n\x04data\
- \x18\x03\x20\x01(\x0cR\x04data\"f\n\x0fNewDocumentUser\x12\x17\n\x07user\
- _id\x18\x01\x20\x01(\tR\x06userId\x12\x15\n\x06doc_id\x18\x02\x20\x01(\t\
- R\x05docId\x12#\n\rrevision_data\x18\x03\x20\x01(\x0cR\x0crevisionData*=\
- \n\x18ClientRevisionWSDataType\x12\x11\n\rClientPushRev\x10\0\x12\x0e\n\
- \nClientPing\x10\x01*`\n\x18ServerRevisionWSDataType\x12\r\n\tServerAck\
- \x10\0\x12\x11\n\rServerPushRev\x10\x01\x12\x11\n\rServerPullRev\x10\x02\
- \x12\x0f\n\x0bUserConnect\x10\x03b\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()
- })
-}
diff --git a/shared-lib/flowy-user-data-model/src/protobuf/mod.rs b/shared-lib/flowy-user-data-model/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/shared-lib/flowy-user-data-model/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/shared-lib/flowy-user-data-model/src/protobuf/model/auth.rs b/shared-lib/flowy-user-data-model/src/protobuf/model/auth.rs
deleted file mode 100644
index e4f550b04f..0000000000
--- a/shared-lib/flowy-user-data-model/src/protobuf/model/auth.rs
+++ /dev/null
@@ -1,1597 +0,0 @@
-// 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 `auth.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 SignInPayload {
- // message fields
- pub email: ::std::string::String,
- pub password: ::std::string::String,
- pub name: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a SignInPayload {
- fn default() -> &'a SignInPayload {
- <SignInPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl SignInPayload {
- pub fn new() -> SignInPayload {
- ::std::default::Default::default()
- }
-
- // string email = 1;
-
-
- pub fn get_email(&self) -> &str {
- &self.email
- }
- pub fn clear_email(&mut self) {
- self.email.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_email(&mut self, v: ::std::string::String) {
- self.email = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_email(&mut self) -> &mut ::std::string::String {
- &mut self.email
- }
-
- // Take field
- pub fn take_email(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.email, ::std::string::String::new())
- }
-
- // string password = 2;
-
-
- pub fn get_password(&self) -> &str {
- &self.password
- }
- pub fn clear_password(&mut self) {
- self.password.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_password(&mut self, v: ::std::string::String) {
- self.password = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_password(&mut self) -> &mut ::std::string::String {
- &mut self.password
- }
-
- // Take field
- pub fn take_password(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.password, ::std::string::String::new())
- }
-
- // string name = 3;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for SignInPayload {
- 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.email)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.password)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- _ => {
- ::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.email.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.email);
- }
- if !self.password.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.password);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.name);
- }
- 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.email.is_empty() {
- os.write_string(1, &self.email)?;
- }
- if !self.password.is_empty() {
- os.write_string(2, &self.password)?;
- }
- if !self.name.is_empty() {
- os.write_string(3, &self.name)?;
- }
- 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() -> SignInPayload {
- SignInPayload::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>(
- "email",
- |m: &SignInPayload| { &m.email },
- |m: &mut SignInPayload| { &mut m.email },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "password",
- |m: &SignInPayload| { &m.password },
- |m: &mut SignInPayload| { &mut m.password },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &SignInPayload| { &m.name },
- |m: &mut SignInPayload| { &mut m.name },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SignInPayload>(
- "SignInPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static SignInPayload {
- static instance: ::protobuf::rt::LazyV2<SignInPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(SignInPayload::new)
- }
-}
-
-impl ::protobuf::Clear for SignInPayload {
- fn clear(&mut self) {
- self.email.clear();
- self.password.clear();
- self.name.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for SignInPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for SignInPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct SignInParams {
- // message fields
- pub email: ::std::string::String,
- pub password: ::std::string::String,
- pub name: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a SignInParams {
- fn default() -> &'a SignInParams {
- <SignInParams as ::protobuf::Message>::default_instance()
- }
-}
-
-impl SignInParams {
- pub fn new() -> SignInParams {
- ::std::default::Default::default()
- }
-
- // string email = 1;
-
-
- pub fn get_email(&self) -> &str {
- &self.email
- }
- pub fn clear_email(&mut self) {
- self.email.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_email(&mut self, v: ::std::string::String) {
- self.email = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_email(&mut self) -> &mut ::std::string::String {
- &mut self.email
- }
-
- // Take field
- pub fn take_email(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.email, ::std::string::String::new())
- }
-
- // string password = 2;
-
-
- pub fn get_password(&self) -> &str {
- &self.password
- }
- pub fn clear_password(&mut self) {
- self.password.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_password(&mut self, v: ::std::string::String) {
- self.password = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_password(&mut self) -> &mut ::std::string::String {
- &mut self.password
- }
-
- // Take field
- pub fn take_password(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.password, ::std::string::String::new())
- }
-
- // string name = 3;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for SignInParams {
- 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.email)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.password)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- _ => {
- ::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.email.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.email);
- }
- if !self.password.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.password);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.name);
- }
- 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.email.is_empty() {
- os.write_string(1, &self.email)?;
- }
- if !self.password.is_empty() {
- os.write_string(2, &self.password)?;
- }
- if !self.name.is_empty() {
- os.write_string(3, &self.name)?;
- }
- 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() -> SignInParams {
- SignInParams::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>(
- "email",
- |m: &SignInParams| { &m.email },
- |m: &mut SignInParams| { &mut m.email },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "password",
- |m: &SignInParams| { &m.password },
- |m: &mut SignInParams| { &mut m.password },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &SignInParams| { &m.name },
- |m: &mut SignInParams| { &mut m.name },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SignInParams>(
- "SignInParams",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static SignInParams {
- static instance: ::protobuf::rt::LazyV2<SignInParams> = ::protobuf::rt::LazyV2::INIT;
- instance.get(SignInParams::new)
- }
-}
-
-impl ::protobuf::Clear for SignInParams {
- fn clear(&mut self) {
- self.email.clear();
- self.password.clear();
- self.name.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for SignInParams {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for SignInParams {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct SignInResponse {
- // message fields
- pub user_id: ::std::string::String,
- pub name: ::std::string::String,
- pub email: ::std::string::String,
- pub token: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a SignInResponse {
- fn default() -> &'a SignInResponse {
- <SignInResponse as ::protobuf::Message>::default_instance()
- }
-}
-
-impl SignInResponse {
- pub fn new() -> SignInResponse {
- ::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())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string email = 3;
-
-
- pub fn get_email(&self) -> &str {
- &self.email
- }
- pub fn clear_email(&mut self) {
- self.email.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_email(&mut self, v: ::std::string::String) {
- self.email = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_email(&mut self) -> &mut ::std::string::String {
- &mut self.email
- }
-
- // Take field
- pub fn take_email(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.email, ::std::string::String::new())
- }
-
- // string token = 4;
-
-
- pub fn get_token(&self) -> &str {
- &self.token
- }
- pub fn clear_token(&mut self) {
- self.token.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_token(&mut self, v: ::std::string::String) {
- self.token = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_token(&mut self) -> &mut ::std::string::String {
- &mut self.token
- }
-
- // Take field
- pub fn take_token(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.token, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for SignInResponse {
- 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 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.email)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.token)?;
- },
- _ => {
- ::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.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if !self.email.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.email);
- }
- if !self.token.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.token);
- }
- 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.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if !self.email.is_empty() {
- os.write_string(3, &self.email)?;
- }
- if !self.token.is_empty() {
- os.write_string(4, &self.token)?;
- }
- 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() -> SignInResponse {
- SignInResponse::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: &SignInResponse| { &m.user_id },
- |m: &mut SignInResponse| { &mut m.user_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &SignInResponse| { &m.name },
- |m: &mut SignInResponse| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "email",
- |m: &SignInResponse| { &m.email },
- |m: &mut SignInResponse| { &mut m.email },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "token",
- |m: &SignInResponse| { &m.token },
- |m: &mut SignInResponse| { &mut m.token },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SignInResponse>(
- "SignInResponse",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static SignInResponse {
- static instance: ::protobuf::rt::LazyV2<SignInResponse> = ::protobuf::rt::LazyV2::INIT;
- instance.get(SignInResponse::new)
- }
-}
-
-impl ::protobuf::Clear for SignInResponse {
- fn clear(&mut self) {
- self.user_id.clear();
- self.name.clear();
- self.email.clear();
- self.token.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for SignInResponse {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for SignInResponse {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct SignUpPayload {
- // message fields
- pub email: ::std::string::String,
- pub name: ::std::string::String,
- pub password: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a SignUpPayload {
- fn default() -> &'a SignUpPayload {
- <SignUpPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-impl SignUpPayload {
- pub fn new() -> SignUpPayload {
- ::std::default::Default::default()
- }
-
- // string email = 1;
-
-
- pub fn get_email(&self) -> &str {
- &self.email
- }
- pub fn clear_email(&mut self) {
- self.email.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_email(&mut self, v: ::std::string::String) {
- self.email = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_email(&mut self) -> &mut ::std::string::String {
- &mut self.email
- }
-
- // Take field
- pub fn take_email(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.email, ::std::string::String::new())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string password = 3;
-
-
- pub fn get_password(&self) -> &str {
- &self.password
- }
- pub fn clear_password(&mut self) {
- self.password.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_password(&mut self, v: ::std::string::String) {
- self.password = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_password(&mut self) -> &mut ::std::string::String {
- &mut self.password
- }
-
- // Take field
- pub fn take_password(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.password, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for SignUpPayload {
- 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.email)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.password)?;
- },
- _ => {
- ::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.email.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.email);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if !self.password.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.password);
- }
- 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.email.is_empty() {
- os.write_string(1, &self.email)?;
- }
- if !self.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if !self.password.is_empty() {
- os.write_string(3, &self.password)?;
- }
- 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() -> SignUpPayload {
- SignUpPayload::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>(
- "email",
- |m: &SignUpPayload| { &m.email },
- |m: &mut SignUpPayload| { &mut m.email },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &SignUpPayload| { &m.name },
- |m: &mut SignUpPayload| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "password",
- |m: &SignUpPayload| { &m.password },
- |m: &mut SignUpPayload| { &mut m.password },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SignUpPayload>(
- "SignUpPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static SignUpPayload {
- static instance: ::protobuf::rt::LazyV2<SignUpPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(SignUpPayload::new)
- }
-}
-
-impl ::protobuf::Clear for SignUpPayload {
- fn clear(&mut self) {
- self.email.clear();
- self.name.clear();
- self.password.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for SignUpPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for SignUpPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct SignUpParams {
- // message fields
- pub email: ::std::string::String,
- pub name: ::std::string::String,
- pub password: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a SignUpParams {
- fn default() -> &'a SignUpParams {
- <SignUpParams as ::protobuf::Message>::default_instance()
- }
-}
-
-impl SignUpParams {
- pub fn new() -> SignUpParams {
- ::std::default::Default::default()
- }
-
- // string email = 1;
-
-
- pub fn get_email(&self) -> &str {
- &self.email
- }
- pub fn clear_email(&mut self) {
- self.email.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_email(&mut self, v: ::std::string::String) {
- self.email = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_email(&mut self) -> &mut ::std::string::String {
- &mut self.email
- }
-
- // Take field
- pub fn take_email(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.email, ::std::string::String::new())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string password = 3;
-
-
- pub fn get_password(&self) -> &str {
- &self.password
- }
- pub fn clear_password(&mut self) {
- self.password.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_password(&mut self, v: ::std::string::String) {
- self.password = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_password(&mut self) -> &mut ::std::string::String {
- &mut self.password
- }
-
- // Take field
- pub fn take_password(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.password, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for SignUpParams {
- 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.email)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.password)?;
- },
- _ => {
- ::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.email.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.email);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if !self.password.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.password);
- }
- 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.email.is_empty() {
- os.write_string(1, &self.email)?;
- }
- if !self.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if !self.password.is_empty() {
- os.write_string(3, &self.password)?;
- }
- 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() -> SignUpParams {
- SignUpParams::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>(
- "email",
- |m: &SignUpParams| { &m.email },
- |m: &mut SignUpParams| { &mut m.email },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &SignUpParams| { &m.name },
- |m: &mut SignUpParams| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "password",
- |m: &SignUpParams| { &m.password },
- |m: &mut SignUpParams| { &mut m.password },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SignUpParams>(
- "SignUpParams",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static SignUpParams {
- static instance: ::protobuf::rt::LazyV2<SignUpParams> = ::protobuf::rt::LazyV2::INIT;
- instance.get(SignUpParams::new)
- }
-}
-
-impl ::protobuf::Clear for SignUpParams {
- fn clear(&mut self) {
- self.email.clear();
- self.name.clear();
- self.password.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for SignUpParams {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for SignUpParams {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct SignUpResponse {
- // message fields
- pub user_id: ::std::string::String,
- pub name: ::std::string::String,
- pub email: ::std::string::String,
- pub token: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a SignUpResponse {
- fn default() -> &'a SignUpResponse {
- <SignUpResponse as ::protobuf::Message>::default_instance()
- }
-}
-
-impl SignUpResponse {
- pub fn new() -> SignUpResponse {
- ::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())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string email = 3;
-
-
- pub fn get_email(&self) -> &str {
- &self.email
- }
- pub fn clear_email(&mut self) {
- self.email.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_email(&mut self, v: ::std::string::String) {
- self.email = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_email(&mut self) -> &mut ::std::string::String {
- &mut self.email
- }
-
- // Take field
- pub fn take_email(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.email, ::std::string::String::new())
- }
-
- // string token = 4;
-
-
- pub fn get_token(&self) -> &str {
- &self.token
- }
- pub fn clear_token(&mut self) {
- self.token.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_token(&mut self, v: ::std::string::String) {
- self.token = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_token(&mut self) -> &mut ::std::string::String {
- &mut self.token
- }
-
- // Take field
- pub fn take_token(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.token, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for SignUpResponse {
- 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 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.email)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.token)?;
- },
- _ => {
- ::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.name.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.name);
- }
- if !self.email.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.email);
- }
- if !self.token.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.token);
- }
- 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.name.is_empty() {
- os.write_string(2, &self.name)?;
- }
- if !self.email.is_empty() {
- os.write_string(3, &self.email)?;
- }
- if !self.token.is_empty() {
- os.write_string(4, &self.token)?;
- }
- 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() -> SignUpResponse {
- SignUpResponse::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: &SignUpResponse| { &m.user_id },
- |m: &mut SignUpResponse| { &mut m.user_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &SignUpResponse| { &m.name },
- |m: &mut SignUpResponse| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "email",
- |m: &SignUpResponse| { &m.email },
- |m: &mut SignUpResponse| { &mut m.email },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "token",
- |m: &SignUpResponse| { &m.token },
- |m: &mut SignUpResponse| { &mut m.token },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SignUpResponse>(
- "SignUpResponse",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static SignUpResponse {
- static instance: ::protobuf::rt::LazyV2<SignUpResponse> = ::protobuf::rt::LazyV2::INIT;
- instance.get(SignUpResponse::new)
- }
-}
-
-impl ::protobuf::Clear for SignUpResponse {
- fn clear(&mut self) {
- self.user_id.clear();
- self.name.clear();
- self.email.clear();
- self.token.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for SignUpResponse {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for SignUpResponse {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\nauth.proto\"U\n\rSignInPayload\x12\x14\n\x05email\x18\x01\x20\x01(\t\
- R\x05email\x12\x1a\n\x08password\x18\x02\x20\x01(\tR\x08password\x12\x12\
- \n\x04name\x18\x03\x20\x01(\tR\x04name\"T\n\x0cSignInParams\x12\x14\n\
- \x05email\x18\x01\x20\x01(\tR\x05email\x12\x1a\n\x08password\x18\x02\x20\
- \x01(\tR\x08password\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\"i\n\
- \x0eSignInResponse\x12\x17\n\x07user_id\x18\x01\x20\x01(\tR\x06userId\
- \x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x14\n\x05email\x18\
- \x03\x20\x01(\tR\x05email\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05toke\
- n\"U\n\rSignUpPayload\x12\x14\n\x05email\x18\x01\x20\x01(\tR\x05email\
- \x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x1a\n\x08password\x18\
- \x03\x20\x01(\tR\x08password\"T\n\x0cSignUpParams\x12\x14\n\x05email\x18\
- \x01\x20\x01(\tR\x05email\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\
- \x12\x1a\n\x08password\x18\x03\x20\x01(\tR\x08password\"i\n\x0eSignUpRes\
- ponse\x12\x17\n\x07user_id\x18\x01\x20\x01(\tR\x06userId\x12\x12\n\x04na\
- me\x18\x02\x20\x01(\tR\x04name\x12\x14\n\x05email\x18\x03\x20\x01(\tR\
- \x05email\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05tokenb\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()
- })
-}
diff --git a/shared-lib/flowy-user-data-model/src/protobuf/model/mod.rs b/shared-lib/flowy-user-data-model/src/protobuf/model/mod.rs
deleted file mode 100644
index 1290420028..0000000000
--- a/shared-lib/flowy-user-data-model/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod user_profile;
-pub use user_profile::*;
-
-mod auth;
-pub use auth::*;
-
-mod user_setting;
-pub use user_setting::*;
diff --git a/shared-lib/flowy-user-data-model/src/protobuf/model/user_profile.rs b/shared-lib/flowy-user-data-model/src/protobuf/model/user_profile.rs
deleted file mode 100644
index a5ad35e389..0000000000
--- a/shared-lib/flowy-user-data-model/src/protobuf/model/user_profile.rs
+++ /dev/null
@@ -1,1302 +0,0 @@
-// 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 `user_profile.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 UserToken {
- // message fields
- pub token: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UserToken {
- fn default() -> &'a UserToken {
- <UserToken as ::protobuf::Message>::default_instance()
- }
-}
-
-impl UserToken {
- pub fn new() -> UserToken {
- ::std::default::Default::default()
- }
-
- // string token = 1;
-
-
- pub fn get_token(&self) -> &str {
- &self.token
- }
- pub fn clear_token(&mut self) {
- self.token.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_token(&mut self, v: ::std::string::String) {
- self.token = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_token(&mut self) -> &mut ::std::string::String {
- &mut self.token
- }
-
- // Take field
- pub fn take_token(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.token, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for UserToken {
- 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.token)?;
- },
- _ => {
- ::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.token.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.token);
- }
- 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.token.is_empty() {
- os.write_string(1, &self.token)?;
- }
- 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() -> UserToken {
- UserToken::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>(
- "token",
- |m: &UserToken| { &m.token },
- |m: &mut UserToken| { &mut m.token },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UserToken>(
- "UserToken",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UserToken {
- static instance: ::protobuf::rt::LazyV2<UserToken> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UserToken::new)
- }
-}
-
-impl ::protobuf::Clear for UserToken {
- fn clear(&mut self) {
- self.token.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UserToken {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UserToken {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UserProfile {
- // message fields
- pub id: ::std::string::String,
- pub email: ::std::string::String,
- pub name: ::std::string::String,
- pub token: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UserProfile {
- fn default() -> &'a UserProfile {
- <UserProfile as ::protobuf::Message>::default_instance()
- }
-}
-
-impl UserProfile {
- pub fn new() -> UserProfile {
- ::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())
- }
-
- // string email = 2;
-
-
- pub fn get_email(&self) -> &str {
- &self.email
- }
- pub fn clear_email(&mut self) {
- self.email.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_email(&mut self, v: ::std::string::String) {
- self.email = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_email(&mut self) -> &mut ::std::string::String {
- &mut self.email
- }
-
- // Take field
- pub fn take_email(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.email, ::std::string::String::new())
- }
-
- // string name = 3;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string token = 4;
-
-
- pub fn get_token(&self) -> &str {
- &self.token
- }
- pub fn clear_token(&mut self) {
- self.token.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_token(&mut self, v: ::std::string::String) {
- self.token = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_token(&mut self) -> &mut ::std::string::String {
- &mut self.token
- }
-
- // Take field
- pub fn take_token(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.token, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for UserProfile {
- 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.id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.email)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.token)?;
- },
- _ => {
- ::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 !self.email.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.email);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.name);
- }
- if !self.token.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.token);
- }
- 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 !self.email.is_empty() {
- os.write_string(2, &self.email)?;
- }
- if !self.name.is_empty() {
- os.write_string(3, &self.name)?;
- }
- if !self.token.is_empty() {
- os.write_string(4, &self.token)?;
- }
- 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() -> UserProfile {
- UserProfile::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: &UserProfile| { &m.id },
- |m: &mut UserProfile| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "email",
- |m: &UserProfile| { &m.email },
- |m: &mut UserProfile| { &mut m.email },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &UserProfile| { &m.name },
- |m: &mut UserProfile| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "token",
- |m: &UserProfile| { &m.token },
- |m: &mut UserProfile| { &mut m.token },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UserProfile>(
- "UserProfile",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UserProfile {
- static instance: ::protobuf::rt::LazyV2<UserProfile> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UserProfile::new)
- }
-}
-
-impl ::protobuf::Clear for UserProfile {
- fn clear(&mut self) {
- self.id.clear();
- self.email.clear();
- self.name.clear();
- self.token.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UserProfile {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UserProfile {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UpdateUserPayload {
- // message fields
- pub id: ::std::string::String,
- // message oneof groups
- pub one_of_name: ::std::option::Option<UpdateUserPayload_oneof_one_of_name>,
- pub one_of_email: ::std::option::Option<UpdateUserPayload_oneof_one_of_email>,
- pub one_of_password: ::std::option::Option<UpdateUserPayload_oneof_one_of_password>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UpdateUserPayload {
- fn default() -> &'a UpdateUserPayload {
- <UpdateUserPayload as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateUserPayload_oneof_one_of_name {
- name(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateUserPayload_oneof_one_of_email {
- email(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateUserPayload_oneof_one_of_password {
- password(::std::string::String),
-}
-
-impl UpdateUserPayload {
- pub fn new() -> UpdateUserPayload {
- ::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())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_name(&mut self) {
- self.one_of_name = ::std::option::Option::None;
- }
-
- pub fn has_name(&self) -> bool {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.one_of_name = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(_)) = self.one_of_name {
- } else {
- self.one_of_name = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(::std::string::String::new()));
- }
- match self.one_of_name {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- if self.has_name() {
- match self.one_of_name.take() {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string email = 3;
-
-
- pub fn get_email(&self) -> &str {
- match self.one_of_email {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_email(&mut self) {
- self.one_of_email = ::std::option::Option::None;
- }
-
- pub fn has_email(&self) -> bool {
- match self.one_of_email {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_email(&mut self, v: ::std::string::String) {
- self.one_of_email = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_email(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(_)) = self.one_of_email {
- } else {
- self.one_of_email = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(::std::string::String::new()));
- }
- match self.one_of_email {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_email(&mut self) -> ::std::string::String {
- if self.has_email() {
- match self.one_of_email.take() {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string password = 4;
-
-
- pub fn get_password(&self) -> &str {
- match self.one_of_password {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_password(&mut self) {
- self.one_of_password = ::std::option::Option::None;
- }
-
- pub fn has_password(&self) -> bool {
- match self.one_of_password {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_password(&mut self, v: ::std::string::String) {
- self.one_of_password = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_password(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(_)) = self.one_of_password {
- } else {
- self.one_of_password = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(::std::string::String::new()));
- }
- match self.one_of_password {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_password(&mut self) -> ::std::string::String {
- if self.has_password() {
- match self.one_of_password.take() {
- ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for UpdateUserPayload {
- 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.id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_name = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(is.read_string()?));
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_email = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(is.read_string()?));
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_password = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(is.read_string()?));
- },
- _ => {
- ::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 ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateUserPayload_oneof_one_of_name::name(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_email {
- match v {
- &UpdateUserPayload_oneof_one_of_email::email(ref v) => {
- my_size += ::protobuf::rt::string_size(3, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_password {
- match v {
- &UpdateUserPayload_oneof_one_of_password::password(ref v) => {
- my_size += ::protobuf::rt::string_size(4, &v);
- },
- };
- }
- 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 ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateUserPayload_oneof_one_of_name::name(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_email {
- match v {
- &UpdateUserPayload_oneof_one_of_email::email(ref v) => {
- os.write_string(3, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_password {
- match v {
- &UpdateUserPayload_oneof_one_of_password::password(ref v) => {
- os.write_string(4, v)?;
- },
- };
- }
- 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() -> UpdateUserPayload {
- UpdateUserPayload::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: &UpdateUserPayload| { &m.id },
- |m: &mut UpdateUserPayload| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "name",
- UpdateUserPayload::has_name,
- UpdateUserPayload::get_name,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "email",
- UpdateUserPayload::has_email,
- UpdateUserPayload::get_email,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "password",
- UpdateUserPayload::has_password,
- UpdateUserPayload::get_password,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateUserPayload>(
- "UpdateUserPayload",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UpdateUserPayload {
- static instance: ::protobuf::rt::LazyV2<UpdateUserPayload> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UpdateUserPayload::new)
- }
-}
-
-impl ::protobuf::Clear for UpdateUserPayload {
- fn clear(&mut self) {
- self.id.clear();
- self.one_of_name = ::std::option::Option::None;
- self.one_of_email = ::std::option::Option::None;
- self.one_of_password = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UpdateUserPayload {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UpdateUserPayload {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct UpdateUserParams {
- // message fields
- pub id: ::std::string::String,
- // message oneof groups
- pub one_of_name: ::std::option::Option<UpdateUserParams_oneof_one_of_name>,
- pub one_of_email: ::std::option::Option<UpdateUserParams_oneof_one_of_email>,
- pub one_of_password: ::std::option::Option<UpdateUserParams_oneof_one_of_password>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UpdateUserParams {
- fn default() -> &'a UpdateUserParams {
- <UpdateUserParams as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateUserParams_oneof_one_of_name {
- name(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateUserParams_oneof_one_of_email {
- email(::std::string::String),
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum UpdateUserParams_oneof_one_of_password {
- password(::std::string::String),
-}
-
-impl UpdateUserParams {
- pub fn new() -> UpdateUserParams {
- ::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())
- }
-
- // string name = 2;
-
-
- pub fn get_name(&self) -> &str {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_name(&mut self) {
- self.one_of_name = ::std::option::Option::None;
- }
-
- pub fn has_name(&self) -> bool {
- match self.one_of_name {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.one_of_name = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(_)) = self.one_of_name {
- } else {
- self.one_of_name = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(::std::string::String::new()));
- }
- match self.one_of_name {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- if self.has_name() {
- match self.one_of_name.take() {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string email = 3;
-
-
- pub fn get_email(&self) -> &str {
- match self.one_of_email {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_email(&mut self) {
- self.one_of_email = ::std::option::Option::None;
- }
-
- pub fn has_email(&self) -> bool {
- match self.one_of_email {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_email(&mut self, v: ::std::string::String) {
- self.one_of_email = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_email(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(_)) = self.one_of_email {
- } else {
- self.one_of_email = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(::std::string::String::new()));
- }
- match self.one_of_email {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_email(&mut self) -> ::std::string::String {
- if self.has_email() {
- match self.one_of_email.take() {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-
- // string password = 4;
-
-
- pub fn get_password(&self) -> &str {
- match self.one_of_password {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_password(&mut self) {
- self.one_of_password = ::std::option::Option::None;
- }
-
- pub fn has_password(&self) -> bool {
- match self.one_of_password {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_password(&mut self, v: ::std::string::String) {
- self.one_of_password = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_password(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(_)) = self.one_of_password {
- } else {
- self.one_of_password = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(::std::string::String::new()));
- }
- match self.one_of_password {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_password(&mut self) -> ::std::string::String {
- if self.has_password() {
- match self.one_of_password.take() {
- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for UpdateUserParams {
- 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.id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_name = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(is.read_string()?));
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_email = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(is.read_string()?));
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_password = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(is.read_string()?));
- },
- _ => {
- ::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 ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateUserParams_oneof_one_of_name::name(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_email {
- match v {
- &UpdateUserParams_oneof_one_of_email::email(ref v) => {
- my_size += ::protobuf::rt::string_size(3, &v);
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_password {
- match v {
- &UpdateUserParams_oneof_one_of_password::password(ref v) => {
- my_size += ::protobuf::rt::string_size(4, &v);
- },
- };
- }
- 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 ::std::option::Option::Some(ref v) = self.one_of_name {
- match v {
- &UpdateUserParams_oneof_one_of_name::name(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_email {
- match v {
- &UpdateUserParams_oneof_one_of_email::email(ref v) => {
- os.write_string(3, v)?;
- },
- };
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_password {
- match v {
- &UpdateUserParams_oneof_one_of_password::password(ref v) => {
- os.write_string(4, v)?;
- },
- };
- }
- 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() -> UpdateUserParams {
- UpdateUserParams::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: &UpdateUserParams| { &m.id },
- |m: &mut UpdateUserParams| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "name",
- UpdateUserParams::has_name,
- UpdateUserParams::get_name,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "email",
- UpdateUserParams::has_email,
- UpdateUserParams::get_email,
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "password",
- UpdateUserParams::has_password,
- UpdateUserParams::get_password,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateUserParams>(
- "UpdateUserParams",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UpdateUserParams {
- static instance: ::protobuf::rt::LazyV2<UpdateUserParams> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UpdateUserParams::new)
- }
-}
-
-impl ::protobuf::Clear for UpdateUserParams {
- fn clear(&mut self) {
- self.id.clear();
- self.one_of_name = ::std::option::Option::None;
- self.one_of_email = ::std::option::Option::None;
- self.one_of_password = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UpdateUserParams {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UpdateUserParams {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x12user_profile.proto\"!\n\tUserToken\x12\x14\n\x05token\x18\x01\x20\
- \x01(\tR\x05token\"]\n\x0bUserProfile\x12\x0e\n\x02id\x18\x01\x20\x01(\t\
- R\x02id\x12\x14\n\x05email\x18\x02\x20\x01(\tR\x05email\x12\x12\n\x04nam\
- e\x18\x03\x20\x01(\tR\x04name\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05\
- token\"\xa1\x01\n\x11UpdateUserPayload\x12\x0e\n\x02id\x18\x01\x20\x01(\
- \tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x16\n\x05\
- email\x18\x03\x20\x01(\tH\x01R\x05email\x12\x1c\n\x08password\x18\x04\
- \x20\x01(\tH\x02R\x08passwordB\r\n\x0bone_of_nameB\x0e\n\x0cone_of_email\
- B\x11\n\x0fone_of_password\"\xa0\x01\n\x10UpdateUserParams\x12\x0e\n\x02\
- id\x18\x01\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\
- \x04name\x12\x16\n\x05email\x18\x03\x20\x01(\tH\x01R\x05email\x12\x1c\n\
- \x08password\x18\x04\x20\x01(\tH\x02R\x08passwordB\r\n\x0bone_of_nameB\
- \x0e\n\x0cone_of_emailB\x11\n\x0fone_of_passwordb\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()
- })
-}
diff --git a/shared-lib/flowy-user-data-model/src/protobuf/model/user_setting.rs b/shared-lib/flowy-user-data-model/src/protobuf/model/user_setting.rs
deleted file mode 100644
index c173360230..0000000000
--- a/shared-lib/flowy-user-data-model/src/protobuf/model/user_setting.rs
+++ /dev/null
@@ -1,715 +0,0 @@
-// 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 `user_setting.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 UserPreferences {
- // message fields
- pub user_id: ::std::string::String,
- pub appearance_setting: ::protobuf::SingularPtrField<AppearanceSettings>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a UserPreferences {
- fn default() -> &'a UserPreferences {
- <UserPreferences as ::protobuf::Message>::default_instance()
- }
-}
-
-impl UserPreferences {
- pub fn new() -> UserPreferences {
- ::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())
- }
-
- // .AppearanceSettings appearance_setting = 2;
-
-
- pub fn get_appearance_setting(&self) -> &AppearanceSettings {
- self.appearance_setting.as_ref().unwrap_or_else(|| <AppearanceSettings as ::protobuf::Message>::default_instance())
- }
- pub fn clear_appearance_setting(&mut self) {
- self.appearance_setting.clear();
- }
-
- pub fn has_appearance_setting(&self) -> bool {
- self.appearance_setting.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_appearance_setting(&mut self, v: AppearanceSettings) {
- self.appearance_setting = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_appearance_setting(&mut self) -> &mut AppearanceSettings {
- if self.appearance_setting.is_none() {
- self.appearance_setting.set_default();
- }
- self.appearance_setting.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_appearance_setting(&mut self) -> AppearanceSettings {
- self.appearance_setting.take().unwrap_or_else(|| AppearanceSettings::new())
- }
-}
-
-impl ::protobuf::Message for UserPreferences {
- fn is_initialized(&self) -> bool {
- for v in &self.appearance_setting {
- 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.user_id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.appearance_setting)?;
- },
- _ => {
- ::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 let Some(ref v) = self.appearance_setting.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.user_id.is_empty() {
- os.write_string(1, &self.user_id)?;
- }
- if let Some(ref v) = self.appearance_setting.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() -> UserPreferences {
- UserPreferences::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: &UserPreferences| { &m.user_id },
- |m: &mut UserPreferences| { &mut m.user_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AppearanceSettings>>(
- "appearance_setting",
- |m: &UserPreferences| { &m.appearance_setting },
- |m: &mut UserPreferences| { &mut m.appearance_setting },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UserPreferences>(
- "UserPreferences",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static UserPreferences {
- static instance: ::protobuf::rt::LazyV2<UserPreferences> = ::protobuf::rt::LazyV2::INIT;
- instance.get(UserPreferences::new)
- }
-}
-
-impl ::protobuf::Clear for UserPreferences {
- fn clear(&mut self) {
- self.user_id.clear();
- self.appearance_setting.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for UserPreferences {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for UserPreferences {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct AppearanceSettings {
- // message fields
- pub theme: ::std::string::String,
- pub locale: ::protobuf::SingularPtrField<LocaleSettings>,
- pub reset_as_default: bool,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a AppearanceSettings {
- fn default() -> &'a AppearanceSettings {
- <AppearanceSettings as ::protobuf::Message>::default_instance()
- }
-}
-
-impl AppearanceSettings {
- pub fn new() -> AppearanceSettings {
- ::std::default::Default::default()
- }
-
- // string theme = 1;
-
-
- pub fn get_theme(&self) -> &str {
- &self.theme
- }
- pub fn clear_theme(&mut self) {
- self.theme.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_theme(&mut self, v: ::std::string::String) {
- self.theme = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_theme(&mut self) -> &mut ::std::string::String {
- &mut self.theme
- }
-
- // Take field
- pub fn take_theme(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.theme, ::std::string::String::new())
- }
-
- // .LocaleSettings locale = 2;
-
-
- pub fn get_locale(&self) -> &LocaleSettings {
- self.locale.as_ref().unwrap_or_else(|| <LocaleSettings as ::protobuf::Message>::default_instance())
- }
- pub fn clear_locale(&mut self) {
- self.locale.clear();
- }
-
- pub fn has_locale(&self) -> bool {
- self.locale.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_locale(&mut self, v: LocaleSettings) {
- self.locale = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_locale(&mut self) -> &mut LocaleSettings {
- if self.locale.is_none() {
- self.locale.set_default();
- }
- self.locale.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_locale(&mut self) -> LocaleSettings {
- self.locale.take().unwrap_or_else(|| LocaleSettings::new())
- }
-
- // bool reset_as_default = 3;
-
-
- pub fn get_reset_as_default(&self) -> bool {
- self.reset_as_default
- }
- pub fn clear_reset_as_default(&mut self) {
- self.reset_as_default = false;
- }
-
- // Param is passed by value, moved
- pub fn set_reset_as_default(&mut self, v: bool) {
- self.reset_as_default = v;
- }
-}
-
-impl ::protobuf::Message for AppearanceSettings {
- fn is_initialized(&self) -> bool {
- for v in &self.locale {
- 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.theme)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.locale)?;
- },
- 3 => {
- 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.reset_as_default = 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.theme.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.theme);
- }
- if let Some(ref v) = self.locale.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if self.reset_as_default != 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.theme.is_empty() {
- os.write_string(1, &self.theme)?;
- }
- if let Some(ref v) = self.locale.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.reset_as_default != false {
- os.write_bool(3, self.reset_as_default)?;
- }
- 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() -> AppearanceSettings {
- AppearanceSettings::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>(
- "theme",
- |m: &AppearanceSettings| { &m.theme },
- |m: &mut AppearanceSettings| { &mut m.theme },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LocaleSettings>>(
- "locale",
- |m: &AppearanceSettings| { &m.locale },
- |m: &mut AppearanceSettings| { &mut m.locale },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "reset_as_default",
- |m: &AppearanceSettings| { &m.reset_as_default },
- |m: &mut AppearanceSettings| { &mut m.reset_as_default },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<AppearanceSettings>(
- "AppearanceSettings",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static AppearanceSettings {
- static instance: ::protobuf::rt::LazyV2<AppearanceSettings> = ::protobuf::rt::LazyV2::INIT;
- instance.get(AppearanceSettings::new)
- }
-}
-
-impl ::protobuf::Clear for AppearanceSettings {
- fn clear(&mut self) {
- self.theme.clear();
- self.locale.clear();
- self.reset_as_default = false;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for AppearanceSettings {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for AppearanceSettings {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct LocaleSettings {
- // message fields
- pub language_code: ::std::string::String,
- pub country_code: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a LocaleSettings {
- fn default() -> &'a LocaleSettings {
- <LocaleSettings as ::protobuf::Message>::default_instance()
- }
-}
-
-impl LocaleSettings {
- pub fn new() -> LocaleSettings {
- ::std::default::Default::default()
- }
-
- // string language_code = 1;
-
-
- pub fn get_language_code(&self) -> &str {
- &self.language_code
- }
- pub fn clear_language_code(&mut self) {
- self.language_code.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_language_code(&mut self, v: ::std::string::String) {
- self.language_code = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_language_code(&mut self) -> &mut ::std::string::String {
- &mut self.language_code
- }
-
- // Take field
- pub fn take_language_code(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.language_code, ::std::string::String::new())
- }
-
- // string country_code = 2;
-
-
- pub fn get_country_code(&self) -> &str {
- &self.country_code
- }
- pub fn clear_country_code(&mut self) {
- self.country_code.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_country_code(&mut self, v: ::std::string::String) {
- self.country_code = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_country_code(&mut self) -> &mut ::std::string::String {
- &mut self.country_code
- }
-
- // Take field
- pub fn take_country_code(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.country_code, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for LocaleSettings {
- 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.language_code)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.country_code)?;
- },
- _ => {
- ::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.language_code.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.language_code);
- }
- if !self.country_code.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.country_code);
- }
- 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.language_code.is_empty() {
- os.write_string(1, &self.language_code)?;
- }
- if !self.country_code.is_empty() {
- os.write_string(2, &self.country_code)?;
- }
- 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() -> LocaleSettings {
- LocaleSettings::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>(
- "language_code",
- |m: &LocaleSettings| { &m.language_code },
- |m: &mut LocaleSettings| { &mut m.language_code },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "country_code",
- |m: &LocaleSettings| { &m.country_code },
- |m: &mut LocaleSettings| { &mut m.country_code },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<LocaleSettings>(
- "LocaleSettings",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static LocaleSettings {
- static instance: ::protobuf::rt::LazyV2<LocaleSettings> = ::protobuf::rt::LazyV2::INIT;
- instance.get(LocaleSettings::new)
- }
-}
-
-impl ::protobuf::Clear for LocaleSettings {
- fn clear(&mut self) {
- self.language_code.clear();
- self.country_code.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for LocaleSettings {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for LocaleSettings {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x12user_setting.proto\"n\n\x0fUserPreferences\x12\x17\n\x07user_id\
- \x18\x01\x20\x01(\tR\x06userId\x12B\n\x12appearance_setting\x18\x02\x20\
- \x01(\x0b2\x13.AppearanceSettingsR\x11appearanceSetting\"}\n\x12Appearan\
- ceSettings\x12\x14\n\x05theme\x18\x01\x20\x01(\tR\x05theme\x12'\n\x06loc\
- ale\x18\x02\x20\x01(\x0b2\x0f.LocaleSettingsR\x06locale\x12(\n\x10reset_\
- as_default\x18\x03\x20\x01(\x08R\x0eresetAsDefault\"X\n\x0eLocaleSetting\
- s\x12#\n\rlanguage_code\x18\x01\x20\x01(\tR\x0clanguageCode\x12!\n\x0cco\
- untry_code\x18\x02\x20\x01(\tR\x0bcountryCodeb\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()
- })
-}
diff --git a/shared-lib/lib-ws/src/protobuf/mod.rs b/shared-lib/lib-ws/src/protobuf/mod.rs
deleted file mode 100644
index da97aad28a..0000000000
--- a/shared-lib/lib-ws/src/protobuf/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-mod model;
-pub use model::*;
\ No newline at end of file
diff --git a/shared-lib/lib-ws/src/protobuf/model/errors.rs b/shared-lib/lib-ws/src/protobuf/model/errors.rs
deleted file mode 100644
index 0df21d613a..0000000000
--- a/shared-lib/lib-ws/src/protobuf/model/errors.rs
+++ /dev/null
@@ -1,286 +0,0 @@
-// 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 `errors.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 WSError {
- // message fields
- pub code: ErrorCode,
- pub msg: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a WSError {
- fn default() -> &'a WSError {
- <WSError as ::protobuf::Message>::default_instance()
- }
-}
-
-impl WSError {
- pub fn new() -> WSError {
- ::std::default::Default::default()
- }
-
- // .ErrorCode code = 1;
-
-
- pub fn get_code(&self) -> ErrorCode {
- self.code
- }
- pub fn clear_code(&mut self) {
- self.code = ErrorCode::InternalError;
- }
-
- // Param is passed by value, moved
- pub fn set_code(&mut self, v: ErrorCode) {
- self.code = v;
- }
-
- // string msg = 2;
-
-
- pub fn get_msg(&self) -> &str {
- &self.msg
- }
- pub fn clear_msg(&mut self) {
- self.msg.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_msg(&mut self, v: ::std::string::String) {
- self.msg = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_msg(&mut self) -> &mut ::std::string::String {
- &mut self.msg
- }
-
- // Take field
- pub fn take_msg(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.msg, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for WSError {
- 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_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.code, 1, &mut self.unknown_fields)?
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.msg)?;
- },
- _ => {
- ::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 != ErrorCode::InternalError {
- my_size += ::protobuf::rt::enum_size(1, self.code);
- }
- if !self.msg.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.msg);
- }
- 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 != ErrorCode::InternalError {
- os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.code))?;
- }
- if !self.msg.is_empty() {
- os.write_string(2, &self.msg)?;
- }
- 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() -> WSError {
- WSError::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::ProtobufTypeEnum<ErrorCode>>(
- "code",
- |m: &WSError| { &m.code },
- |m: &mut WSError| { &mut m.code },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "msg",
- |m: &WSError| { &m.msg },
- |m: &mut WSError| { &mut m.msg },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<WSError>(
- "WSError",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static WSError {
- static instance: ::protobuf::rt::LazyV2<WSError> = ::protobuf::rt::LazyV2::INIT;
- instance.get(WSError::new)
- }
-}
-
-impl ::protobuf::Clear for WSError {
- fn clear(&mut self) {
- self.code = ErrorCode::InternalError;
- self.msg.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for WSError {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for WSError {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum ErrorCode {
- InternalError = 0,
- UnsupportedMessage = 1,
- Unauthorized = 2,
-}
-
-impl ::protobuf::ProtobufEnum for ErrorCode {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<ErrorCode> {
- match value {
- 0 => ::std::option::Option::Some(ErrorCode::InternalError),
- 1 => ::std::option::Option::Some(ErrorCode::UnsupportedMessage),
- 2 => ::std::option::Option::Some(ErrorCode::Unauthorized),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [ErrorCode] = &[
- ErrorCode::InternalError,
- ErrorCode::UnsupportedMessage,
- ErrorCode::Unauthorized,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<ErrorCode>("ErrorCode", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for ErrorCode {
-}
-
-impl ::std::default::Default for ErrorCode {
- fn default() -> Self {
- ErrorCode::InternalError
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ErrorCode {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0cerrors.proto\";\n\x07WSError\x12\x1e\n\x04code\x18\x01\x20\x01(\
- \x0e2\n.ErrorCodeR\x04code\x12\x10\n\x03msg\x18\x02\x20\x01(\tR\x03msg*H\
- \n\tErrorCode\x12\x11\n\rInternalError\x10\0\x12\x16\n\x12UnsupportedMes\
- sage\x10\x01\x12\x10\n\x0cUnauthorized\x10\x02b\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()
- })
-}
diff --git a/shared-lib/lib-ws/src/protobuf/model/mod.rs b/shared-lib/lib-ws/src/protobuf/model/mod.rs
deleted file mode 100644
index 280e596bde..0000000000
--- a/shared-lib/lib-ws/src/protobuf/model/mod.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![cfg_attr(rustfmt, rustfmt::skip)]
-// Auto-generated, do not edit
-
-mod errors;
-pub use errors::*;
-
-mod msg;
-pub use msg::*;
diff --git a/shared-lib/lib-ws/src/protobuf/model/msg.rs b/shared-lib/lib-ws/src/protobuf/model/msg.rs
deleted file mode 100644
index 35537df3f0..0000000000
--- a/shared-lib/lib-ws/src/protobuf/model/msg.rs
+++ /dev/null
@@ -1,286 +0,0 @@
-// 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 `msg.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 WebSocketRawMessage {
- // message fields
- pub channel: WSChannel,
- pub data: ::std::vec::Vec<u8>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a WebSocketRawMessage {
- fn default() -> &'a WebSocketRawMessage {
- <WebSocketRawMessage as ::protobuf::Message>::default_instance()
- }
-}
-
-impl WebSocketRawMessage {
- pub fn new() -> WebSocketRawMessage {
- ::std::default::Default::default()
- }
-
- // .WSChannel channel = 1;
-
-
- pub fn get_channel(&self) -> WSChannel {
- self.channel
- }
- pub fn clear_channel(&mut self) {
- self.channel = WSChannel::Document;
- }
-
- // Param is passed by value, moved
- pub fn set_channel(&mut self, v: WSChannel) {
- self.channel = v;
- }
-
- // bytes data = 2;
-
-
- pub fn get_data(&self) -> &[u8] {
- &self.data
- }
- 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())
- }
-}
-
-impl ::protobuf::Message for WebSocketRawMessage {
- 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_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.channel, 1, &mut self.unknown_fields)?
- },
- 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.channel != WSChannel::Document {
- my_size += ::protobuf::rt::enum_size(1, self.channel);
- }
- 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.channel != WSChannel::Document {
- os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.channel))?;
- }
- 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) -> &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() -> WebSocketRawMessage {
- WebSocketRawMessage::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::ProtobufTypeEnum<WSChannel>>(
- "channel",
- |m: &WebSocketRawMessage| { &m.channel },
- |m: &mut WebSocketRawMessage| { &mut m.channel },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "data",
- |m: &WebSocketRawMessage| { &m.data },
- |m: &mut WebSocketRawMessage| { &mut m.data },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<WebSocketRawMessage>(
- "WebSocketRawMessage",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static WebSocketRawMessage {
- static instance: ::protobuf::rt::LazyV2<WebSocketRawMessage> = ::protobuf::rt::LazyV2::INIT;
- instance.get(WebSocketRawMessage::new)
- }
-}
-
-impl ::protobuf::Clear for WebSocketRawMessage {
- fn clear(&mut self) {
- self.channel = WSChannel::Document;
- self.data.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for WebSocketRawMessage {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for WebSocketRawMessage {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(Clone,PartialEq,Eq,Debug,Hash)]
-pub enum WSChannel {
- Document = 0,
- Folder = 1,
- Grid = 2,
-}
-
-impl ::protobuf::ProtobufEnum for WSChannel {
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<WSChannel> {
- match value {
- 0 => ::std::option::Option::Some(WSChannel::Document),
- 1 => ::std::option::Option::Some(WSChannel::Folder),
- 2 => ::std::option::Option::Some(WSChannel::Grid),
- _ => ::std::option::Option::None
- }
- }
-
- fn values() -> &'static [Self] {
- static values: &'static [WSChannel] = &[
- WSChannel::Document,
- WSChannel::Folder,
- WSChannel::Grid,
- ];
- values
- }
-
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<WSChannel>("WSChannel", file_descriptor_proto())
- })
- }
-}
-
-impl ::std::marker::Copy for WSChannel {
-}
-
-impl ::std::default::Default for WSChannel {
- fn default() -> Self {
- WSChannel::Document
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for WSChannel {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\tmsg.proto\"O\n\x13WebSocketRawMessage\x12$\n\x07channel\x18\x01\x20\
- \x01(\x0e2\n.WSChannelR\x07channel\x12\x12\n\x04data\x18\x02\x20\x01(\
- \x0cR\x04data*/\n\tWSChannel\x12\x0c\n\x08Document\x10\0\x12\n\n\x06Fold\
- er\x10\x01\x12\x08\n\x04Grid\x10\x02b\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()
- })
-}