workspace_create.rs 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  1. // This file is generated by rust-protobuf 2.22.1. Do not edit
  2. // @generated
  3. // https://github.com/rust-lang/rust-clippy/issues/702
  4. #![allow(unknown_lints)]
  5. #![allow(clippy::all)]
  6. #![allow(unused_attributes)]
  7. #![cfg_attr(rustfmt, rustfmt::skip)]
  8. #![allow(box_pointers)]
  9. #![allow(dead_code)]
  10. #![allow(missing_docs)]
  11. #![allow(non_camel_case_types)]
  12. #![allow(non_snake_case)]
  13. #![allow(non_upper_case_globals)]
  14. #![allow(trivial_casts)]
  15. #![allow(unused_imports)]
  16. #![allow(unused_results)]
  17. //! Generated file from `workspace_create.proto`
  18. /// Generated files are compatible only with the same version
  19. /// of protobuf runtime.
  20. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;
  21. #[derive(PartialEq,Clone,Default)]
  22. pub struct CreateWorkspaceRequest {
  23. // message fields
  24. pub name: ::std::string::String,
  25. pub desc: ::std::string::String,
  26. // special fields
  27. pub unknown_fields: ::protobuf::UnknownFields,
  28. pub cached_size: ::protobuf::CachedSize,
  29. }
  30. impl<'a> ::std::default::Default for &'a CreateWorkspaceRequest {
  31. fn default() -> &'a CreateWorkspaceRequest {
  32. <CreateWorkspaceRequest as ::protobuf::Message>::default_instance()
  33. }
  34. }
  35. impl CreateWorkspaceRequest {
  36. pub fn new() -> CreateWorkspaceRequest {
  37. ::std::default::Default::default()
  38. }
  39. // string name = 1;
  40. pub fn get_name(&self) -> &str {
  41. &self.name
  42. }
  43. pub fn clear_name(&mut self) {
  44. self.name.clear();
  45. }
  46. // Param is passed by value, moved
  47. pub fn set_name(&mut self, v: ::std::string::String) {
  48. self.name = v;
  49. }
  50. // Mutable pointer to the field.
  51. // If field is not initialized, it is initialized with default value first.
  52. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  53. &mut self.name
  54. }
  55. // Take field
  56. pub fn take_name(&mut self) -> ::std::string::String {
  57. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  58. }
  59. // string desc = 2;
  60. pub fn get_desc(&self) -> &str {
  61. &self.desc
  62. }
  63. pub fn clear_desc(&mut self) {
  64. self.desc.clear();
  65. }
  66. // Param is passed by value, moved
  67. pub fn set_desc(&mut self, v: ::std::string::String) {
  68. self.desc = v;
  69. }
  70. // Mutable pointer to the field.
  71. // If field is not initialized, it is initialized with default value first.
  72. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  73. &mut self.desc
  74. }
  75. // Take field
  76. pub fn take_desc(&mut self) -> ::std::string::String {
  77. ::std::mem::replace(&mut self.desc, ::std::string::String::new())
  78. }
  79. }
  80. impl ::protobuf::Message for CreateWorkspaceRequest {
  81. fn is_initialized(&self) -> bool {
  82. true
  83. }
  84. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  85. while !is.eof()? {
  86. let (field_number, wire_type) = is.read_tag_unpack()?;
  87. match field_number {
  88. 1 => {
  89. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  90. },
  91. 2 => {
  92. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  93. },
  94. _ => {
  95. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  96. },
  97. };
  98. }
  99. ::std::result::Result::Ok(())
  100. }
  101. // Compute sizes of nested messages
  102. #[allow(unused_variables)]
  103. fn compute_size(&self) -> u32 {
  104. let mut my_size = 0;
  105. if !self.name.is_empty() {
  106. my_size += ::protobuf::rt::string_size(1, &self.name);
  107. }
  108. if !self.desc.is_empty() {
  109. my_size += ::protobuf::rt::string_size(2, &self.desc);
  110. }
  111. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  112. self.cached_size.set(my_size);
  113. my_size
  114. }
  115. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  116. if !self.name.is_empty() {
  117. os.write_string(1, &self.name)?;
  118. }
  119. if !self.desc.is_empty() {
  120. os.write_string(2, &self.desc)?;
  121. }
  122. os.write_unknown_fields(self.get_unknown_fields())?;
  123. ::std::result::Result::Ok(())
  124. }
  125. fn get_cached_size(&self) -> u32 {
  126. self.cached_size.get()
  127. }
  128. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  129. &self.unknown_fields
  130. }
  131. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  132. &mut self.unknown_fields
  133. }
  134. fn as_any(&self) -> &dyn (::std::any::Any) {
  135. self as &dyn (::std::any::Any)
  136. }
  137. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  138. self as &mut dyn (::std::any::Any)
  139. }
  140. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  141. self
  142. }
  143. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  144. Self::descriptor_static()
  145. }
  146. fn new() -> CreateWorkspaceRequest {
  147. CreateWorkspaceRequest::new()
  148. }
  149. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  150. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  151. descriptor.get(|| {
  152. let mut fields = ::std::vec::Vec::new();
  153. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  154. "name",
  155. |m: &CreateWorkspaceRequest| { &m.name },
  156. |m: &mut CreateWorkspaceRequest| { &mut m.name },
  157. ));
  158. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  159. "desc",
  160. |m: &CreateWorkspaceRequest| { &m.desc },
  161. |m: &mut CreateWorkspaceRequest| { &mut m.desc },
  162. ));
  163. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateWorkspaceRequest>(
  164. "CreateWorkspaceRequest",
  165. fields,
  166. file_descriptor_proto()
  167. )
  168. })
  169. }
  170. fn default_instance() -> &'static CreateWorkspaceRequest {
  171. static instance: ::protobuf::rt::LazyV2<CreateWorkspaceRequest> = ::protobuf::rt::LazyV2::INIT;
  172. instance.get(CreateWorkspaceRequest::new)
  173. }
  174. }
  175. impl ::protobuf::Clear for CreateWorkspaceRequest {
  176. fn clear(&mut self) {
  177. self.name.clear();
  178. self.desc.clear();
  179. self.unknown_fields.clear();
  180. }
  181. }
  182. impl ::std::fmt::Debug for CreateWorkspaceRequest {
  183. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  184. ::protobuf::text_format::fmt(self, f)
  185. }
  186. }
  187. impl ::protobuf::reflect::ProtobufValue for CreateWorkspaceRequest {
  188. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  189. ::protobuf::reflect::ReflectValueRef::Message(self)
  190. }
  191. }
  192. #[derive(PartialEq,Clone,Default)]
  193. pub struct CreateWorkspaceParams {
  194. // message fields
  195. pub name: ::std::string::String,
  196. pub desc: ::std::string::String,
  197. // special fields
  198. pub unknown_fields: ::protobuf::UnknownFields,
  199. pub cached_size: ::protobuf::CachedSize,
  200. }
  201. impl<'a> ::std::default::Default for &'a CreateWorkspaceParams {
  202. fn default() -> &'a CreateWorkspaceParams {
  203. <CreateWorkspaceParams as ::protobuf::Message>::default_instance()
  204. }
  205. }
  206. impl CreateWorkspaceParams {
  207. pub fn new() -> CreateWorkspaceParams {
  208. ::std::default::Default::default()
  209. }
  210. // string name = 1;
  211. pub fn get_name(&self) -> &str {
  212. &self.name
  213. }
  214. pub fn clear_name(&mut self) {
  215. self.name.clear();
  216. }
  217. // Param is passed by value, moved
  218. pub fn set_name(&mut self, v: ::std::string::String) {
  219. self.name = v;
  220. }
  221. // Mutable pointer to the field.
  222. // If field is not initialized, it is initialized with default value first.
  223. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  224. &mut self.name
  225. }
  226. // Take field
  227. pub fn take_name(&mut self) -> ::std::string::String {
  228. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  229. }
  230. // string desc = 2;
  231. pub fn get_desc(&self) -> &str {
  232. &self.desc
  233. }
  234. pub fn clear_desc(&mut self) {
  235. self.desc.clear();
  236. }
  237. // Param is passed by value, moved
  238. pub fn set_desc(&mut self, v: ::std::string::String) {
  239. self.desc = v;
  240. }
  241. // Mutable pointer to the field.
  242. // If field is not initialized, it is initialized with default value first.
  243. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  244. &mut self.desc
  245. }
  246. // Take field
  247. pub fn take_desc(&mut self) -> ::std::string::String {
  248. ::std::mem::replace(&mut self.desc, ::std::string::String::new())
  249. }
  250. }
  251. impl ::protobuf::Message for CreateWorkspaceParams {
  252. fn is_initialized(&self) -> bool {
  253. true
  254. }
  255. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  256. while !is.eof()? {
  257. let (field_number, wire_type) = is.read_tag_unpack()?;
  258. match field_number {
  259. 1 => {
  260. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  261. },
  262. 2 => {
  263. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  264. },
  265. _ => {
  266. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  267. },
  268. };
  269. }
  270. ::std::result::Result::Ok(())
  271. }
  272. // Compute sizes of nested messages
  273. #[allow(unused_variables)]
  274. fn compute_size(&self) -> u32 {
  275. let mut my_size = 0;
  276. if !self.name.is_empty() {
  277. my_size += ::protobuf::rt::string_size(1, &self.name);
  278. }
  279. if !self.desc.is_empty() {
  280. my_size += ::protobuf::rt::string_size(2, &self.desc);
  281. }
  282. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  283. self.cached_size.set(my_size);
  284. my_size
  285. }
  286. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  287. if !self.name.is_empty() {
  288. os.write_string(1, &self.name)?;
  289. }
  290. if !self.desc.is_empty() {
  291. os.write_string(2, &self.desc)?;
  292. }
  293. os.write_unknown_fields(self.get_unknown_fields())?;
  294. ::std::result::Result::Ok(())
  295. }
  296. fn get_cached_size(&self) -> u32 {
  297. self.cached_size.get()
  298. }
  299. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  300. &self.unknown_fields
  301. }
  302. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  303. &mut self.unknown_fields
  304. }
  305. fn as_any(&self) -> &dyn (::std::any::Any) {
  306. self as &dyn (::std::any::Any)
  307. }
  308. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  309. self as &mut dyn (::std::any::Any)
  310. }
  311. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  312. self
  313. }
  314. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  315. Self::descriptor_static()
  316. }
  317. fn new() -> CreateWorkspaceParams {
  318. CreateWorkspaceParams::new()
  319. }
  320. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  321. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  322. descriptor.get(|| {
  323. let mut fields = ::std::vec::Vec::new();
  324. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  325. "name",
  326. |m: &CreateWorkspaceParams| { &m.name },
  327. |m: &mut CreateWorkspaceParams| { &mut m.name },
  328. ));
  329. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  330. "desc",
  331. |m: &CreateWorkspaceParams| { &m.desc },
  332. |m: &mut CreateWorkspaceParams| { &mut m.desc },
  333. ));
  334. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateWorkspaceParams>(
  335. "CreateWorkspaceParams",
  336. fields,
  337. file_descriptor_proto()
  338. )
  339. })
  340. }
  341. fn default_instance() -> &'static CreateWorkspaceParams {
  342. static instance: ::protobuf::rt::LazyV2<CreateWorkspaceParams> = ::protobuf::rt::LazyV2::INIT;
  343. instance.get(CreateWorkspaceParams::new)
  344. }
  345. }
  346. impl ::protobuf::Clear for CreateWorkspaceParams {
  347. fn clear(&mut self) {
  348. self.name.clear();
  349. self.desc.clear();
  350. self.unknown_fields.clear();
  351. }
  352. }
  353. impl ::std::fmt::Debug for CreateWorkspaceParams {
  354. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  355. ::protobuf::text_format::fmt(self, f)
  356. }
  357. }
  358. impl ::protobuf::reflect::ProtobufValue for CreateWorkspaceParams {
  359. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  360. ::protobuf::reflect::ReflectValueRef::Message(self)
  361. }
  362. }
  363. #[derive(PartialEq,Clone,Default)]
  364. pub struct Workspace {
  365. // message fields
  366. pub id: ::std::string::String,
  367. pub name: ::std::string::String,
  368. pub desc: ::std::string::String,
  369. pub apps: ::protobuf::SingularPtrField<super::app_create::RepeatedApp>,
  370. pub modified_time: i64,
  371. pub create_time: i64,
  372. // special fields
  373. pub unknown_fields: ::protobuf::UnknownFields,
  374. pub cached_size: ::protobuf::CachedSize,
  375. }
  376. impl<'a> ::std::default::Default for &'a Workspace {
  377. fn default() -> &'a Workspace {
  378. <Workspace as ::protobuf::Message>::default_instance()
  379. }
  380. }
  381. impl Workspace {
  382. pub fn new() -> Workspace {
  383. ::std::default::Default::default()
  384. }
  385. // string id = 1;
  386. pub fn get_id(&self) -> &str {
  387. &self.id
  388. }
  389. pub fn clear_id(&mut self) {
  390. self.id.clear();
  391. }
  392. // Param is passed by value, moved
  393. pub fn set_id(&mut self, v: ::std::string::String) {
  394. self.id = v;
  395. }
  396. // Mutable pointer to the field.
  397. // If field is not initialized, it is initialized with default value first.
  398. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  399. &mut self.id
  400. }
  401. // Take field
  402. pub fn take_id(&mut self) -> ::std::string::String {
  403. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  404. }
  405. // string name = 2;
  406. pub fn get_name(&self) -> &str {
  407. &self.name
  408. }
  409. pub fn clear_name(&mut self) {
  410. self.name.clear();
  411. }
  412. // Param is passed by value, moved
  413. pub fn set_name(&mut self, v: ::std::string::String) {
  414. self.name = v;
  415. }
  416. // Mutable pointer to the field.
  417. // If field is not initialized, it is initialized with default value first.
  418. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  419. &mut self.name
  420. }
  421. // Take field
  422. pub fn take_name(&mut self) -> ::std::string::String {
  423. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  424. }
  425. // string desc = 3;
  426. pub fn get_desc(&self) -> &str {
  427. &self.desc
  428. }
  429. pub fn clear_desc(&mut self) {
  430. self.desc.clear();
  431. }
  432. // Param is passed by value, moved
  433. pub fn set_desc(&mut self, v: ::std::string::String) {
  434. self.desc = v;
  435. }
  436. // Mutable pointer to the field.
  437. // If field is not initialized, it is initialized with default value first.
  438. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  439. &mut self.desc
  440. }
  441. // Take field
  442. pub fn take_desc(&mut self) -> ::std::string::String {
  443. ::std::mem::replace(&mut self.desc, ::std::string::String::new())
  444. }
  445. // .RepeatedApp apps = 4;
  446. pub fn get_apps(&self) -> &super::app_create::RepeatedApp {
  447. self.apps.as_ref().unwrap_or_else(|| <super::app_create::RepeatedApp as ::protobuf::Message>::default_instance())
  448. }
  449. pub fn clear_apps(&mut self) {
  450. self.apps.clear();
  451. }
  452. pub fn has_apps(&self) -> bool {
  453. self.apps.is_some()
  454. }
  455. // Param is passed by value, moved
  456. pub fn set_apps(&mut self, v: super::app_create::RepeatedApp) {
  457. self.apps = ::protobuf::SingularPtrField::some(v);
  458. }
  459. // Mutable pointer to the field.
  460. // If field is not initialized, it is initialized with default value first.
  461. pub fn mut_apps(&mut self) -> &mut super::app_create::RepeatedApp {
  462. if self.apps.is_none() {
  463. self.apps.set_default();
  464. }
  465. self.apps.as_mut().unwrap()
  466. }
  467. // Take field
  468. pub fn take_apps(&mut self) -> super::app_create::RepeatedApp {
  469. self.apps.take().unwrap_or_else(|| super::app_create::RepeatedApp::new())
  470. }
  471. // int64 modified_time = 5;
  472. pub fn get_modified_time(&self) -> i64 {
  473. self.modified_time
  474. }
  475. pub fn clear_modified_time(&mut self) {
  476. self.modified_time = 0;
  477. }
  478. // Param is passed by value, moved
  479. pub fn set_modified_time(&mut self, v: i64) {
  480. self.modified_time = v;
  481. }
  482. // int64 create_time = 6;
  483. pub fn get_create_time(&self) -> i64 {
  484. self.create_time
  485. }
  486. pub fn clear_create_time(&mut self) {
  487. self.create_time = 0;
  488. }
  489. // Param is passed by value, moved
  490. pub fn set_create_time(&mut self, v: i64) {
  491. self.create_time = v;
  492. }
  493. }
  494. impl ::protobuf::Message for Workspace {
  495. fn is_initialized(&self) -> bool {
  496. for v in &self.apps {
  497. if !v.is_initialized() {
  498. return false;
  499. }
  500. };
  501. true
  502. }
  503. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  504. while !is.eof()? {
  505. let (field_number, wire_type) = is.read_tag_unpack()?;
  506. match field_number {
  507. 1 => {
  508. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  509. },
  510. 2 => {
  511. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  512. },
  513. 3 => {
  514. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  515. },
  516. 4 => {
  517. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.apps)?;
  518. },
  519. 5 => {
  520. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  521. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  522. }
  523. let tmp = is.read_int64()?;
  524. self.modified_time = tmp;
  525. },
  526. 6 => {
  527. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  528. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  529. }
  530. let tmp = is.read_int64()?;
  531. self.create_time = tmp;
  532. },
  533. _ => {
  534. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  535. },
  536. };
  537. }
  538. ::std::result::Result::Ok(())
  539. }
  540. // Compute sizes of nested messages
  541. #[allow(unused_variables)]
  542. fn compute_size(&self) -> u32 {
  543. let mut my_size = 0;
  544. if !self.id.is_empty() {
  545. my_size += ::protobuf::rt::string_size(1, &self.id);
  546. }
  547. if !self.name.is_empty() {
  548. my_size += ::protobuf::rt::string_size(2, &self.name);
  549. }
  550. if !self.desc.is_empty() {
  551. my_size += ::protobuf::rt::string_size(3, &self.desc);
  552. }
  553. if let Some(ref v) = self.apps.as_ref() {
  554. let len = v.compute_size();
  555. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  556. }
  557. if self.modified_time != 0 {
  558. my_size += ::protobuf::rt::value_size(5, self.modified_time, ::protobuf::wire_format::WireTypeVarint);
  559. }
  560. if self.create_time != 0 {
  561. my_size += ::protobuf::rt::value_size(6, self.create_time, ::protobuf::wire_format::WireTypeVarint);
  562. }
  563. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  564. self.cached_size.set(my_size);
  565. my_size
  566. }
  567. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  568. if !self.id.is_empty() {
  569. os.write_string(1, &self.id)?;
  570. }
  571. if !self.name.is_empty() {
  572. os.write_string(2, &self.name)?;
  573. }
  574. if !self.desc.is_empty() {
  575. os.write_string(3, &self.desc)?;
  576. }
  577. if let Some(ref v) = self.apps.as_ref() {
  578. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  579. os.write_raw_varint32(v.get_cached_size())?;
  580. v.write_to_with_cached_sizes(os)?;
  581. }
  582. if self.modified_time != 0 {
  583. os.write_int64(5, self.modified_time)?;
  584. }
  585. if self.create_time != 0 {
  586. os.write_int64(6, self.create_time)?;
  587. }
  588. os.write_unknown_fields(self.get_unknown_fields())?;
  589. ::std::result::Result::Ok(())
  590. }
  591. fn get_cached_size(&self) -> u32 {
  592. self.cached_size.get()
  593. }
  594. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  595. &self.unknown_fields
  596. }
  597. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  598. &mut self.unknown_fields
  599. }
  600. fn as_any(&self) -> &dyn (::std::any::Any) {
  601. self as &dyn (::std::any::Any)
  602. }
  603. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  604. self as &mut dyn (::std::any::Any)
  605. }
  606. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  607. self
  608. }
  609. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  610. Self::descriptor_static()
  611. }
  612. fn new() -> Workspace {
  613. Workspace::new()
  614. }
  615. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  616. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  617. descriptor.get(|| {
  618. let mut fields = ::std::vec::Vec::new();
  619. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  620. "id",
  621. |m: &Workspace| { &m.id },
  622. |m: &mut Workspace| { &mut m.id },
  623. ));
  624. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  625. "name",
  626. |m: &Workspace| { &m.name },
  627. |m: &mut Workspace| { &mut m.name },
  628. ));
  629. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  630. "desc",
  631. |m: &Workspace| { &m.desc },
  632. |m: &mut Workspace| { &mut m.desc },
  633. ));
  634. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::app_create::RepeatedApp>>(
  635. "apps",
  636. |m: &Workspace| { &m.apps },
  637. |m: &mut Workspace| { &mut m.apps },
  638. ));
  639. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  640. "modified_time",
  641. |m: &Workspace| { &m.modified_time },
  642. |m: &mut Workspace| { &mut m.modified_time },
  643. ));
  644. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  645. "create_time",
  646. |m: &Workspace| { &m.create_time },
  647. |m: &mut Workspace| { &mut m.create_time },
  648. ));
  649. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Workspace>(
  650. "Workspace",
  651. fields,
  652. file_descriptor_proto()
  653. )
  654. })
  655. }
  656. fn default_instance() -> &'static Workspace {
  657. static instance: ::protobuf::rt::LazyV2<Workspace> = ::protobuf::rt::LazyV2::INIT;
  658. instance.get(Workspace::new)
  659. }
  660. }
  661. impl ::protobuf::Clear for Workspace {
  662. fn clear(&mut self) {
  663. self.id.clear();
  664. self.name.clear();
  665. self.desc.clear();
  666. self.apps.clear();
  667. self.modified_time = 0;
  668. self.create_time = 0;
  669. self.unknown_fields.clear();
  670. }
  671. }
  672. impl ::std::fmt::Debug for Workspace {
  673. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  674. ::protobuf::text_format::fmt(self, f)
  675. }
  676. }
  677. impl ::protobuf::reflect::ProtobufValue for Workspace {
  678. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  679. ::protobuf::reflect::ReflectValueRef::Message(self)
  680. }
  681. }
  682. #[derive(PartialEq,Clone,Default)]
  683. pub struct RepeatedWorkspace {
  684. // message fields
  685. pub items: ::protobuf::RepeatedField<Workspace>,
  686. // special fields
  687. pub unknown_fields: ::protobuf::UnknownFields,
  688. pub cached_size: ::protobuf::CachedSize,
  689. }
  690. impl<'a> ::std::default::Default for &'a RepeatedWorkspace {
  691. fn default() -> &'a RepeatedWorkspace {
  692. <RepeatedWorkspace as ::protobuf::Message>::default_instance()
  693. }
  694. }
  695. impl RepeatedWorkspace {
  696. pub fn new() -> RepeatedWorkspace {
  697. ::std::default::Default::default()
  698. }
  699. // repeated .Workspace items = 1;
  700. pub fn get_items(&self) -> &[Workspace] {
  701. &self.items
  702. }
  703. pub fn clear_items(&mut self) {
  704. self.items.clear();
  705. }
  706. // Param is passed by value, moved
  707. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Workspace>) {
  708. self.items = v;
  709. }
  710. // Mutable pointer to the field.
  711. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Workspace> {
  712. &mut self.items
  713. }
  714. // Take field
  715. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Workspace> {
  716. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  717. }
  718. }
  719. impl ::protobuf::Message for RepeatedWorkspace {
  720. fn is_initialized(&self) -> bool {
  721. for v in &self.items {
  722. if !v.is_initialized() {
  723. return false;
  724. }
  725. };
  726. true
  727. }
  728. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  729. while !is.eof()? {
  730. let (field_number, wire_type) = is.read_tag_unpack()?;
  731. match field_number {
  732. 1 => {
  733. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  734. },
  735. _ => {
  736. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  737. },
  738. };
  739. }
  740. ::std::result::Result::Ok(())
  741. }
  742. // Compute sizes of nested messages
  743. #[allow(unused_variables)]
  744. fn compute_size(&self) -> u32 {
  745. let mut my_size = 0;
  746. for value in &self.items {
  747. let len = value.compute_size();
  748. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  749. };
  750. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  751. self.cached_size.set(my_size);
  752. my_size
  753. }
  754. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  755. for v in &self.items {
  756. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  757. os.write_raw_varint32(v.get_cached_size())?;
  758. v.write_to_with_cached_sizes(os)?;
  759. };
  760. os.write_unknown_fields(self.get_unknown_fields())?;
  761. ::std::result::Result::Ok(())
  762. }
  763. fn get_cached_size(&self) -> u32 {
  764. self.cached_size.get()
  765. }
  766. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  767. &self.unknown_fields
  768. }
  769. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  770. &mut self.unknown_fields
  771. }
  772. fn as_any(&self) -> &dyn (::std::any::Any) {
  773. self as &dyn (::std::any::Any)
  774. }
  775. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  776. self as &mut dyn (::std::any::Any)
  777. }
  778. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  779. self
  780. }
  781. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  782. Self::descriptor_static()
  783. }
  784. fn new() -> RepeatedWorkspace {
  785. RepeatedWorkspace::new()
  786. }
  787. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  788. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  789. descriptor.get(|| {
  790. let mut fields = ::std::vec::Vec::new();
  791. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Workspace>>(
  792. "items",
  793. |m: &RepeatedWorkspace| { &m.items },
  794. |m: &mut RepeatedWorkspace| { &mut m.items },
  795. ));
  796. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedWorkspace>(
  797. "RepeatedWorkspace",
  798. fields,
  799. file_descriptor_proto()
  800. )
  801. })
  802. }
  803. fn default_instance() -> &'static RepeatedWorkspace {
  804. static instance: ::protobuf::rt::LazyV2<RepeatedWorkspace> = ::protobuf::rt::LazyV2::INIT;
  805. instance.get(RepeatedWorkspace::new)
  806. }
  807. }
  808. impl ::protobuf::Clear for RepeatedWorkspace {
  809. fn clear(&mut self) {
  810. self.items.clear();
  811. self.unknown_fields.clear();
  812. }
  813. }
  814. impl ::std::fmt::Debug for RepeatedWorkspace {
  815. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  816. ::protobuf::text_format::fmt(self, f)
  817. }
  818. }
  819. impl ::protobuf::reflect::ProtobufValue for RepeatedWorkspace {
  820. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  821. ::protobuf::reflect::ReflectValueRef::Message(self)
  822. }
  823. }
  824. static file_descriptor_proto_data: &'static [u8] = b"\
  825. \n\x16workspace_create.proto\x1a\x10app_create.proto\"@\n\x16CreateWorks\
  826. paceRequest\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04d\
  827. esc\x18\x02\x20\x01(\tR\x04desc\"?\n\x15CreateWorkspaceParams\x12\x12\n\
  828. \x04name\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x02\x20\x01(\
  829. \tR\x04desc\"\xab\x01\n\tWorkspace\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\
  830. \x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\
  831. \x18\x03\x20\x01(\tR\x04desc\x12\x20\n\x04apps\x18\x04\x20\x01(\x0b2\x0c\
  832. .RepeatedAppR\x04apps\x12#\n\rmodified_time\x18\x05\x20\x01(\x03R\x0cmod\
  833. ifiedTime\x12\x1f\n\x0bcreate_time\x18\x06\x20\x01(\x03R\ncreateTime\"5\
  834. \n\x11RepeatedWorkspace\x12\x20\n\x05items\x18\x01\x20\x03(\x0b2\n.Works\
  835. paceR\x05itemsJ\xe8\x05\n\x06\x12\x04\0\0\x15\x01\n\x08\n\x01\x0c\x12\
  836. \x03\0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x1a\n\n\n\x02\x04\0\x12\x04\
  837. \x03\0\x06\x01\n\n\n\x03\x04\0\x01\x12\x03\x03\x08\x1e\n\x0b\n\x04\x04\0\
  838. \x02\0\x12\x03\x04\x04\x14\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x04\x04\n\
  839. \n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x04\x0b\x0f\n\x0c\n\x05\x04\0\x02\0\
  840. \x03\x12\x03\x04\x12\x13\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x05\x04\x14\n\
  841. \x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x01\
  842. \x01\x12\x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x05\x12\
  843. \x13\n\n\n\x02\x04\x01\x12\x04\x07\0\n\x01\n\n\n\x03\x04\x01\x01\x12\x03\
  844. \x07\x08\x1d\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x08\x04\x14\n\x0c\n\x05\
  845. \x04\x01\x02\0\x05\x12\x03\x08\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\
  846. \x03\x08\x0b\x0f\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x08\x12\x13\n\x0b\
  847. \n\x04\x04\x01\x02\x01\x12\x03\t\x04\x14\n\x0c\n\x05\x04\x01\x02\x01\x05\
  848. \x12\x03\t\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\t\x0b\x0f\n\x0c\
  849. \n\x05\x04\x01\x02\x01\x03\x12\x03\t\x12\x13\n\n\n\x02\x04\x02\x12\x04\
  850. \x0b\0\x12\x01\n\n\n\x03\x04\x02\x01\x12\x03\x0b\x08\x11\n\x0b\n\x04\x04\
  851. \x02\x02\0\x12\x03\x0c\x04\x12\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x0c\
  852. \x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x0c\x0b\r\n\x0c\n\x05\x04\
  853. \x02\x02\0\x03\x12\x03\x0c\x10\x11\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\r\
  854. \x04\x14\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\r\x04\n\n\x0c\n\x05\x04\
  855. \x02\x02\x01\x01\x12\x03\r\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\
  856. \x03\r\x12\x13\n\x0b\n\x04\x04\x02\x02\x02\x12\x03\x0e\x04\x14\n\x0c\n\
  857. \x05\x04\x02\x02\x02\x05\x12\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\x02\x02\
  858. \x01\x12\x03\x0e\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\x0e\x12\
  859. \x13\n\x0b\n\x04\x04\x02\x02\x03\x12\x03\x0f\x04\x19\n\x0c\n\x05\x04\x02\
  860. \x02\x03\x06\x12\x03\x0f\x04\x0f\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\
  861. \x0f\x10\x14\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03\x0f\x17\x18\n\x0b\n\
  862. \x04\x04\x02\x02\x04\x12\x03\x10\x04\x1c\n\x0c\n\x05\x04\x02\x02\x04\x05\
  863. \x12\x03\x10\x04\t\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03\x10\n\x17\n\
  864. \x0c\n\x05\x04\x02\x02\x04\x03\x12\x03\x10\x1a\x1b\n\x0b\n\x04\x04\x02\
  865. \x02\x05\x12\x03\x11\x04\x1a\n\x0c\n\x05\x04\x02\x02\x05\x05\x12\x03\x11\
  866. \x04\t\n\x0c\n\x05\x04\x02\x02\x05\x01\x12\x03\x11\n\x15\n\x0c\n\x05\x04\
  867. \x02\x02\x05\x03\x12\x03\x11\x18\x19\n\n\n\x02\x04\x03\x12\x04\x13\0\x15\
  868. \x01\n\n\n\x03\x04\x03\x01\x12\x03\x13\x08\x19\n\x0b\n\x04\x04\x03\x02\0\
  869. \x12\x03\x14\x04!\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03\x14\x04\x0c\n\
  870. \x0c\n\x05\x04\x03\x02\0\x06\x12\x03\x14\r\x16\n\x0c\n\x05\x04\x03\x02\0\
  871. \x01\x12\x03\x14\x17\x1c\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x14\x1f\
  872. \x20b\x06proto3\
  873. ";
  874. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  875. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  876. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  877. }
  878. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  879. file_descriptor_proto_lazy.get(|| {
  880. parse_descriptor_proto()
  881. })
  882. }