desmos_bindings/proto/desmos/reactions/v1/
mod.rs

1pub mod client;
2/// Reaction contains the data of a single post reaction
3#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(
5    Clone,
6    PartialEq,
7    ::prost::Message,
8    schemars::JsonSchema,
9    serde::Serialize,
10    serde::Deserialize,
11    desmos_std_derive::CosmwasmExt,
12)]
13#[proto_message(type_url = "/desmos.reactions.v1.Reaction")]
14#[serde(rename_all = "snake_case")]
15pub struct Reaction {
16    /// Id of the subspace inside which the reaction has been put
17    #[prost(uint64, tag = "1")]
18    #[serde(
19        serialize_with = "crate::serde::as_str::serialize",
20        deserialize_with = "crate::serde::as_str::deserialize"
21    )]
22    pub subspace_id: u64,
23    /// Id of the post to which the reaction is associated
24    #[prost(uint64, tag = "2")]
25    #[serde(
26        serialize_with = "crate::serde::as_str::serialize",
27        deserialize_with = "crate::serde::as_str::deserialize"
28    )]
29    pub post_id: u64,
30    /// Id of the reaction within the post
31    #[prost(uint32, tag = "3")]
32    pub id: u32,
33    /// Value of the reaction.
34    #[prost(message, optional, tag = "4")]
35    pub value: ::core::option::Option<crate::shim::Any>,
36    /// Author of the reaction
37    #[prost(string, tag = "5")]
38    pub author: ::prost::alloc::string::String,
39}
40/// RegisteredReactionValue contains the details of a reaction value that
41/// references a reaction registered within the subspace
42#[allow(clippy::derive_partial_eq_without_eq)]
43#[derive(
44    Clone,
45    PartialEq,
46    ::prost::Message,
47    schemars::JsonSchema,
48    serde::Serialize,
49    serde::Deserialize,
50    desmos_std_derive::CosmwasmExt,
51)]
52#[proto_message(type_url = "/desmos.reactions.v1.RegisteredReactionValue")]
53#[serde(rename_all = "snake_case")]
54pub struct RegisteredReactionValue {
55    /// Id of the registered reaction
56    #[prost(uint32, tag = "1")]
57    pub registered_reaction_id: u32,
58}
59/// FreeTextValue contains the details of a reaction value that
60/// is made of free text
61#[allow(clippy::derive_partial_eq_without_eq)]
62#[derive(
63    Clone,
64    PartialEq,
65    ::prost::Message,
66    schemars::JsonSchema,
67    serde::Serialize,
68    serde::Deserialize,
69    desmos_std_derive::CosmwasmExt,
70)]
71#[proto_message(type_url = "/desmos.reactions.v1.FreeTextValue")]
72#[serde(rename_all = "snake_case")]
73pub struct FreeTextValue {
74    #[prost(string, tag = "1")]
75    pub text: ::prost::alloc::string::String,
76}
77/// RegisteredReaction contains the details of a registered reaction within a
78/// subspace
79#[allow(clippy::derive_partial_eq_without_eq)]
80#[derive(
81    Clone,
82    PartialEq,
83    ::prost::Message,
84    schemars::JsonSchema,
85    serde::Serialize,
86    serde::Deserialize,
87    desmos_std_derive::CosmwasmExt,
88)]
89#[proto_message(type_url = "/desmos.reactions.v1.RegisteredReaction")]
90#[serde(rename_all = "snake_case")]
91pub struct RegisteredReaction {
92    /// Id of the subspace for which this reaction has been registered
93    #[prost(uint64, tag = "1")]
94    #[serde(
95        serialize_with = "crate::serde::as_str::serialize",
96        deserialize_with = "crate::serde::as_str::deserialize"
97    )]
98    pub subspace_id: u64,
99    /// Id of the registered reaction
100    #[prost(uint32, tag = "2")]
101    pub id: u32,
102    /// Unique shorthand code associated to this reaction
103    #[prost(string, tag = "3")]
104    pub shorthand_code: ::prost::alloc::string::String,
105    /// Value that should be displayed when using this reaction
106    #[prost(string, tag = "4")]
107    pub display_value: ::prost::alloc::string::String,
108}
109/// SubspaceReactionsParams contains the params related to a single subspace
110/// reactions
111#[allow(clippy::derive_partial_eq_without_eq)]
112#[derive(
113    Clone,
114    PartialEq,
115    ::prost::Message,
116    schemars::JsonSchema,
117    serde::Serialize,
118    serde::Deserialize,
119    desmos_std_derive::CosmwasmExt,
120)]
121#[proto_message(type_url = "/desmos.reactions.v1.SubspaceReactionsParams")]
122#[serde(rename_all = "snake_case")]
123pub struct SubspaceReactionsParams {
124    /// Id of the subspace for which these params are valid
125    #[prost(uint64, tag = "1")]
126    #[serde(
127        serialize_with = "crate::serde::as_str::serialize",
128        deserialize_with = "crate::serde::as_str::deserialize"
129    )]
130    pub subspace_id: u64,
131    /// Params related to RegisteredReactionValue reactions
132    #[prost(message, optional, tag = "2")]
133    pub registered_reaction: ::core::option::Option<RegisteredReactionValueParams>,
134    /// Params related to FreeTextValue reactions
135    #[prost(message, optional, tag = "3")]
136    pub free_text: ::core::option::Option<FreeTextValueParams>,
137}
138/// FreeTextValueParams contains the params for FreeTextValue based reactions
139#[allow(clippy::derive_partial_eq_without_eq)]
140#[derive(
141    Clone,
142    PartialEq,
143    ::prost::Message,
144    schemars::JsonSchema,
145    serde::Serialize,
146    serde::Deserialize,
147    desmos_std_derive::CosmwasmExt,
148)]
149#[proto_message(type_url = "/desmos.reactions.v1.FreeTextValueParams")]
150#[serde(rename_all = "snake_case")]
151pub struct FreeTextValueParams {
152    /// Whether FreeTextValue reactions should be enabled
153    #[prost(bool, tag = "1")]
154    pub enabled: bool,
155    /// The max length that FreeTextValue reactions should have
156    #[prost(uint32, tag = "2")]
157    pub max_length: u32,
158    /// RegEx that each FreeTextValue should respect.
159    /// This is useful to limit what characters can be used as a reaction.
160    #[prost(string, tag = "3")]
161    pub reg_ex: ::prost::alloc::string::String,
162}
163/// RegisteredReactionValueParams contains the params for RegisteredReactionValue
164/// based reactions
165#[allow(clippy::derive_partial_eq_without_eq)]
166#[derive(
167    Clone,
168    PartialEq,
169    ::prost::Message,
170    schemars::JsonSchema,
171    serde::Serialize,
172    serde::Deserialize,
173    desmos_std_derive::CosmwasmExt,
174)]
175#[proto_message(type_url = "/desmos.reactions.v1.RegisteredReactionValueParams")]
176#[serde(rename_all = "snake_case")]
177pub struct RegisteredReactionValueParams {
178    /// Whether RegisteredReactionValue reactions should be enabled
179    #[prost(bool, tag = "1")]
180    pub enabled: bool,
181}
182/// GenesisState contains the data of the genesis state for the reactions module
183#[allow(clippy::derive_partial_eq_without_eq)]
184#[derive(
185    Clone,
186    PartialEq,
187    ::prost::Message,
188    schemars::JsonSchema,
189    serde::Serialize,
190    serde::Deserialize,
191    desmos_std_derive::CosmwasmExt,
192)]
193#[proto_message(type_url = "/desmos.reactions.v1.GenesisState")]
194#[serde(rename_all = "snake_case")]
195pub struct GenesisState {
196    #[prost(message, repeated, tag = "1")]
197    pub subspaces_data: ::prost::alloc::vec::Vec<SubspaceDataEntry>,
198    #[prost(message, repeated, tag = "2")]
199    pub registered_reactions: ::prost::alloc::vec::Vec<RegisteredReaction>,
200    #[prost(message, repeated, tag = "3")]
201    pub posts_data: ::prost::alloc::vec::Vec<PostDataEntry>,
202    #[prost(message, repeated, tag = "4")]
203    pub reactions: ::prost::alloc::vec::Vec<Reaction>,
204    #[prost(message, repeated, tag = "5")]
205    pub subspaces_params: ::prost::alloc::vec::Vec<SubspaceReactionsParams>,
206}
207/// SubspaceDataEntry contains the data related to a single subspace
208#[allow(clippy::derive_partial_eq_without_eq)]
209#[derive(
210    Clone,
211    PartialEq,
212    ::prost::Message,
213    schemars::JsonSchema,
214    serde::Serialize,
215    serde::Deserialize,
216    desmos_std_derive::CosmwasmExt,
217)]
218#[proto_message(type_url = "/desmos.reactions.v1.SubspaceDataEntry")]
219#[serde(rename_all = "snake_case")]
220pub struct SubspaceDataEntry {
221    #[prost(uint64, tag = "1")]
222    #[serde(
223        serialize_with = "crate::serde::as_str::serialize",
224        deserialize_with = "crate::serde::as_str::deserialize"
225    )]
226    pub subspace_id: u64,
227    #[prost(uint32, tag = "2")]
228    pub registered_reaction_id: u32,
229}
230/// PostDataEntry contains the data related to a single post
231#[allow(clippy::derive_partial_eq_without_eq)]
232#[derive(
233    Clone,
234    PartialEq,
235    ::prost::Message,
236    schemars::JsonSchema,
237    serde::Serialize,
238    serde::Deserialize,
239    desmos_std_derive::CosmwasmExt,
240)]
241#[proto_message(type_url = "/desmos.reactions.v1.PostDataEntry")]
242#[serde(rename_all = "snake_case")]
243pub struct PostDataEntry {
244    #[prost(uint64, tag = "1")]
245    #[serde(
246        serialize_with = "crate::serde::as_str::serialize",
247        deserialize_with = "crate::serde::as_str::deserialize"
248    )]
249    pub subspace_id: u64,
250    #[prost(uint64, tag = "2")]
251    #[serde(
252        serialize_with = "crate::serde::as_str::serialize",
253        deserialize_with = "crate::serde::as_str::deserialize"
254    )]
255    pub post_id: u64,
256    #[prost(uint32, tag = "3")]
257    pub reaction_id: u32,
258}
259/// MsgAddReaction represents the message to be used to add a post reaction
260#[allow(clippy::derive_partial_eq_without_eq)]
261#[derive(
262    Clone,
263    PartialEq,
264    ::prost::Message,
265    schemars::JsonSchema,
266    serde::Serialize,
267    serde::Deserialize,
268    desmos_std_derive::CosmwasmExt,
269)]
270#[proto_message(type_url = "/desmos.reactions.v1.MsgAddReaction")]
271#[serde(rename_all = "snake_case")]
272pub struct MsgAddReaction {
273    /// Id of the subspace inside which the post to react to is
274    #[prost(uint64, tag = "1")]
275    #[serde(
276        serialize_with = "crate::serde::as_str::serialize",
277        deserialize_with = "crate::serde::as_str::deserialize"
278    )]
279    pub subspace_id: u64,
280    /// Id of the post to react to
281    #[prost(uint64, tag = "2")]
282    #[serde(
283        serialize_with = "crate::serde::as_str::serialize",
284        deserialize_with = "crate::serde::as_str::deserialize"
285    )]
286    pub post_id: u64,
287    /// Value of the reaction
288    #[prost(message, optional, tag = "3")]
289    pub value: ::core::option::Option<crate::shim::Any>,
290    /// User reacting to the post
291    #[prost(string, tag = "4")]
292    pub user: ::prost::alloc::string::String,
293}
294/// MsgAddReactionResponse represents the Msg/AddReaction response type
295#[allow(clippy::derive_partial_eq_without_eq)]
296#[derive(
297    Clone,
298    PartialEq,
299    ::prost::Message,
300    schemars::JsonSchema,
301    serde::Serialize,
302    serde::Deserialize,
303    desmos_std_derive::CosmwasmExt,
304)]
305#[proto_message(type_url = "/desmos.reactions.v1.MsgAddReactionResponse")]
306#[serde(rename_all = "snake_case")]
307pub struct MsgAddReactionResponse {
308    /// Id of the newly added reaction
309    #[prost(uint32, tag = "1")]
310    pub reaction_id: u32,
311}
312/// MsgRemoveReaction represents the message to be used to remove an
313/// existing reaction from a post
314#[allow(clippy::derive_partial_eq_without_eq)]
315#[derive(
316    Clone,
317    PartialEq,
318    ::prost::Message,
319    schemars::JsonSchema,
320    serde::Serialize,
321    serde::Deserialize,
322    desmos_std_derive::CosmwasmExt,
323)]
324#[proto_message(type_url = "/desmos.reactions.v1.MsgRemoveReaction")]
325#[serde(rename_all = "snake_case")]
326pub struct MsgRemoveReaction {
327    /// Id of the subspace inside which the reaction to remove is
328    #[prost(uint64, tag = "1")]
329    #[serde(
330        serialize_with = "crate::serde::as_str::serialize",
331        deserialize_with = "crate::serde::as_str::deserialize"
332    )]
333    pub subspace_id: u64,
334    /// Id of the post from which to remove the reaction
335    #[prost(uint64, tag = "2")]
336    #[serde(
337        serialize_with = "crate::serde::as_str::serialize",
338        deserialize_with = "crate::serde::as_str::deserialize"
339    )]
340    pub post_id: u64,
341    /// Id of the reaction to be removed
342    #[prost(uint32, tag = "3")]
343    pub reaction_id: u32,
344    /// User removing the reaction
345    #[prost(string, tag = "4")]
346    pub user: ::prost::alloc::string::String,
347}
348/// MsgRemoveReactionResponse represents the Msg/RemoveReaction response type
349#[allow(clippy::derive_partial_eq_without_eq)]
350#[derive(
351    Clone,
352    PartialEq,
353    ::prost::Message,
354    schemars::JsonSchema,
355    serde::Serialize,
356    serde::Deserialize,
357    desmos_std_derive::CosmwasmExt,
358)]
359#[proto_message(type_url = "/desmos.reactions.v1.MsgRemoveReactionResponse")]
360#[serde(rename_all = "snake_case")]
361pub struct MsgRemoveReactionResponse {}
362/// MsgAddRegisteredReaction represents the message to be used to
363/// register a new supported reaction
364#[allow(clippy::derive_partial_eq_without_eq)]
365#[derive(
366    Clone,
367    PartialEq,
368    ::prost::Message,
369    schemars::JsonSchema,
370    serde::Serialize,
371    serde::Deserialize,
372    desmos_std_derive::CosmwasmExt,
373)]
374#[proto_message(type_url = "/desmos.reactions.v1.MsgAddRegisteredReaction")]
375#[serde(rename_all = "snake_case")]
376pub struct MsgAddRegisteredReaction {
377    /// Id of the subspace inside which this reaction should be registered
378    #[prost(uint64, tag = "1")]
379    #[serde(
380        serialize_with = "crate::serde::as_str::serialize",
381        deserialize_with = "crate::serde::as_str::deserialize"
382    )]
383    pub subspace_id: u64,
384    /// Shorthand code of the reaction
385    #[prost(string, tag = "2")]
386    pub shorthand_code: ::prost::alloc::string::String,
387    /// Display value of the reaction
388    #[prost(string, tag = "3")]
389    pub display_value: ::prost::alloc::string::String,
390    /// User adding the supported reaction
391    #[prost(string, tag = "4")]
392    pub user: ::prost::alloc::string::String,
393}
394/// MsgAddRegisteredReactionResponse represents the
395/// Msg/AddRegisteredReaction response type
396#[allow(clippy::derive_partial_eq_without_eq)]
397#[derive(
398    Clone,
399    PartialEq,
400    ::prost::Message,
401    schemars::JsonSchema,
402    serde::Serialize,
403    serde::Deserialize,
404    desmos_std_derive::CosmwasmExt,
405)]
406#[proto_message(type_url = "/desmos.reactions.v1.MsgAddRegisteredReactionResponse")]
407#[serde(rename_all = "snake_case")]
408pub struct MsgAddRegisteredReactionResponse {
409    /// Id of the newly registered reaction
410    #[prost(uint32, tag = "1")]
411    pub registered_reaction_id: u32,
412}
413/// MsgEditRegisteredReaction represents the message to be used to edit a
414/// registered reaction
415#[allow(clippy::derive_partial_eq_without_eq)]
416#[derive(
417    Clone,
418    PartialEq,
419    ::prost::Message,
420    schemars::JsonSchema,
421    serde::Serialize,
422    serde::Deserialize,
423    desmos_std_derive::CosmwasmExt,
424)]
425#[proto_message(type_url = "/desmos.reactions.v1.MsgEditRegisteredReaction")]
426#[serde(rename_all = "snake_case")]
427pub struct MsgEditRegisteredReaction {
428    /// Id of the subspace inside which the reaction to edit is
429    #[prost(uint64, tag = "1")]
430    #[serde(
431        serialize_with = "crate::serde::as_str::serialize",
432        deserialize_with = "crate::serde::as_str::deserialize"
433    )]
434    pub subspace_id: u64,
435    /// Id of the registered reaction to edit
436    #[prost(uint32, tag = "2")]
437    pub registered_reaction_id: u32,
438    /// New shorthand code to be set
439    #[prost(string, tag = "3")]
440    pub shorthand_code: ::prost::alloc::string::String,
441    /// Display value to be set
442    #[prost(string, tag = "4")]
443    pub display_value: ::prost::alloc::string::String,
444    /// User editing the registered reaction
445    #[prost(string, tag = "5")]
446    pub user: ::prost::alloc::string::String,
447}
448/// MsgEditRegisteredReactionResponse represents the Msg/EditRegisteredReaction
449/// response type
450#[allow(clippy::derive_partial_eq_without_eq)]
451#[derive(
452    Clone,
453    PartialEq,
454    ::prost::Message,
455    schemars::JsonSchema,
456    serde::Serialize,
457    serde::Deserialize,
458    desmos_std_derive::CosmwasmExt,
459)]
460#[proto_message(type_url = "/desmos.reactions.v1.MsgEditRegisteredReactionResponse")]
461#[serde(rename_all = "snake_case")]
462pub struct MsgEditRegisteredReactionResponse {}
463/// MsgRemoveRegisteredReaction represents the message to be used to
464/// remove an existing registered reaction
465#[allow(clippy::derive_partial_eq_without_eq)]
466#[derive(
467    Clone,
468    PartialEq,
469    ::prost::Message,
470    schemars::JsonSchema,
471    serde::Serialize,
472    serde::Deserialize,
473    desmos_std_derive::CosmwasmExt,
474)]
475#[proto_message(type_url = "/desmos.reactions.v1.MsgRemoveRegisteredReaction")]
476#[serde(rename_all = "snake_case")]
477pub struct MsgRemoveRegisteredReaction {
478    /// Id of the subspace from which to remove the registered reaction
479    #[prost(uint64, tag = "1")]
480    #[serde(
481        serialize_with = "crate::serde::as_str::serialize",
482        deserialize_with = "crate::serde::as_str::deserialize"
483    )]
484    pub subspace_id: u64,
485    /// Id of the registered reaction to be removed
486    #[prost(uint32, tag = "2")]
487    pub registered_reaction_id: u32,
488    /// User removing the registered reaction
489    #[prost(string, tag = "3")]
490    pub user: ::prost::alloc::string::String,
491}
492/// MsgRemoveRegisteredReactionResponse represents the
493/// Msg/RemoveRegisteredReaction response type
494#[allow(clippy::derive_partial_eq_without_eq)]
495#[derive(
496    Clone,
497    PartialEq,
498    ::prost::Message,
499    schemars::JsonSchema,
500    serde::Serialize,
501    serde::Deserialize,
502    desmos_std_derive::CosmwasmExt,
503)]
504#[proto_message(type_url = "/desmos.reactions.v1.MsgRemoveRegisteredReactionResponse")]
505#[serde(rename_all = "snake_case")]
506pub struct MsgRemoveRegisteredReactionResponse {}
507/// MsgSetReactionsParams represents the message to be used when setting
508/// a subspace reactions params
509#[allow(clippy::derive_partial_eq_without_eq)]
510#[derive(
511    Clone,
512    PartialEq,
513    ::prost::Message,
514    schemars::JsonSchema,
515    serde::Serialize,
516    serde::Deserialize,
517    desmos_std_derive::CosmwasmExt,
518)]
519#[proto_message(type_url = "/desmos.reactions.v1.MsgSetReactionsParams")]
520#[serde(rename_all = "snake_case")]
521pub struct MsgSetReactionsParams {
522    /// Id of the subspace for which to set the params
523    #[prost(uint64, tag = "1")]
524    #[serde(
525        serialize_with = "crate::serde::as_str::serialize",
526        deserialize_with = "crate::serde::as_str::deserialize"
527    )]
528    pub subspace_id: u64,
529    /// Params related to RegisteredReactionValue reactions
530    #[prost(message, optional, tag = "2")]
531    pub registered_reaction: ::core::option::Option<RegisteredReactionValueParams>,
532    /// Params related to FreeTextValue reactions
533    #[prost(message, optional, tag = "3")]
534    pub free_text: ::core::option::Option<FreeTextValueParams>,
535    /// User setting the params
536    #[prost(string, tag = "4")]
537    pub user: ::prost::alloc::string::String,
538}
539/// MsgSetReactionsParamsResponse represents the Msg/SetReactionsParams response
540/// type
541#[allow(clippy::derive_partial_eq_without_eq)]
542#[derive(
543    Clone,
544    PartialEq,
545    ::prost::Message,
546    schemars::JsonSchema,
547    serde::Serialize,
548    serde::Deserialize,
549    desmos_std_derive::CosmwasmExt,
550)]
551#[proto_message(type_url = "/desmos.reactions.v1.MsgSetReactionsParamsResponse")]
552#[serde(rename_all = "snake_case")]
553pub struct MsgSetReactionsParamsResponse {}
554/// QueryReactionsRequest is the request type for the Query/Reactions RPC method
555#[allow(clippy::derive_partial_eq_without_eq)]
556#[derive(
557    Clone,
558    PartialEq,
559    ::prost::Message,
560    schemars::JsonSchema,
561    serde::Serialize,
562    serde::Deserialize,
563    desmos_std_derive::CosmwasmExt,
564)]
565#[proto_message(type_url = "/desmos.reactions.v1.QueryReactionsRequest")]
566#[serde(rename_all = "snake_case")]
567#[proto_query(
568    path = "/desmos.reactions.v1.Query/Reactions",
569    response_type = QueryReactionsResponse
570)]
571pub struct QueryReactionsRequest {
572    /// Id of the subspace that contains the post to query the reactions for
573    #[prost(uint64, tag = "1")]
574    #[serde(
575        serialize_with = "crate::serde::as_str::serialize",
576        deserialize_with = "crate::serde::as_str::deserialize"
577    )]
578    pub subspace_id: u64,
579    /// Post id to query the reactions for
580    #[prost(uint64, tag = "2")]
581    #[serde(
582        serialize_with = "crate::serde::as_str::serialize",
583        deserialize_with = "crate::serde::as_str::deserialize"
584    )]
585    pub post_id: u64,
586    /// (optional) User to query the reactions for.
587    /// This is going to be used only if a post id is specified as well.
588    #[prost(string, tag = "3")]
589    pub user: ::prost::alloc::string::String,
590    /// pagination defines an optional pagination for the request.
591    #[prost(message, optional, tag = "4")]
592    pub pagination:
593        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
594}
595/// QueryReactionsResponse is the response type for the Query/Reactions RPC
596/// method
597#[allow(clippy::derive_partial_eq_without_eq)]
598#[derive(
599    Clone,
600    PartialEq,
601    ::prost::Message,
602    schemars::JsonSchema,
603    serde::Serialize,
604    serde::Deserialize,
605    desmos_std_derive::CosmwasmExt,
606)]
607#[proto_message(type_url = "/desmos.reactions.v1.QueryReactionsResponse")]
608#[serde(rename_all = "snake_case")]
609pub struct QueryReactionsResponse {
610    #[prost(message, repeated, tag = "1")]
611    pub reactions: ::prost::alloc::vec::Vec<Reaction>,
612    #[prost(message, optional, tag = "2")]
613    pub pagination:
614        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
615}
616/// QueryReactionRequest is the request type for the Query/ReactionRequest RPC
617/// method
618#[allow(clippy::derive_partial_eq_without_eq)]
619#[derive(
620    Clone,
621    PartialEq,
622    ::prost::Message,
623    schemars::JsonSchema,
624    serde::Serialize,
625    serde::Deserialize,
626    desmos_std_derive::CosmwasmExt,
627)]
628#[proto_message(type_url = "/desmos.reactions.v1.QueryReactionRequest")]
629#[serde(rename_all = "snake_case")]
630#[proto_query(
631    path = "/desmos.reactions.v1.Query/Reaction",
632    response_type = QueryReactionResponse
633)]
634pub struct QueryReactionRequest {
635    /// Id of the subspace that contains the post to query the reactions for
636    #[prost(uint64, tag = "1")]
637    #[serde(
638        serialize_with = "crate::serde::as_str::serialize",
639        deserialize_with = "crate::serde::as_str::deserialize"
640    )]
641    pub subspace_id: u64,
642    /// Post id to query the reactions for
643    #[prost(uint64, tag = "2")]
644    #[serde(
645        serialize_with = "crate::serde::as_str::serialize",
646        deserialize_with = "crate::serde::as_str::deserialize"
647    )]
648    pub post_id: u64,
649    /// Id of the reaction to query
650    #[prost(uint32, tag = "3")]
651    pub reaction_id: u32,
652}
653/// QueryReactionResponse is the response type for the Query/Reaction RPC
654/// method
655#[allow(clippy::derive_partial_eq_without_eq)]
656#[derive(
657    Clone,
658    PartialEq,
659    ::prost::Message,
660    schemars::JsonSchema,
661    serde::Serialize,
662    serde::Deserialize,
663    desmos_std_derive::CosmwasmExt,
664)]
665#[proto_message(type_url = "/desmos.reactions.v1.QueryReactionResponse")]
666#[serde(rename_all = "snake_case")]
667pub struct QueryReactionResponse {
668    #[prost(message, optional, tag = "1")]
669    pub reaction: ::core::option::Option<Reaction>,
670}
671/// QueryRegisteredReactionsRequest is the request type for the
672/// Query/RegisteredReactions RPC method
673#[allow(clippy::derive_partial_eq_without_eq)]
674#[derive(
675    Clone,
676    PartialEq,
677    ::prost::Message,
678    schemars::JsonSchema,
679    serde::Serialize,
680    serde::Deserialize,
681    desmos_std_derive::CosmwasmExt,
682)]
683#[proto_message(type_url = "/desmos.reactions.v1.QueryRegisteredReactionsRequest")]
684#[serde(rename_all = "snake_case")]
685#[proto_query(
686    path = "/desmos.reactions.v1.Query/RegisteredReactions",
687    response_type = QueryRegisteredReactionsResponse
688)]
689pub struct QueryRegisteredReactionsRequest {
690    /// Id of the subspace to query the registered reactions for
691    #[prost(uint64, tag = "1")]
692    #[serde(
693        serialize_with = "crate::serde::as_str::serialize",
694        deserialize_with = "crate::serde::as_str::deserialize"
695    )]
696    pub subspace_id: u64,
697    /// pagination defines an optional pagination for the request.
698    #[prost(message, optional, tag = "3")]
699    pub pagination:
700        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
701}
702/// QueryRegisteredReactionsResponse is the response type for the
703/// Query/RegisteredReactions RPC method
704#[allow(clippy::derive_partial_eq_without_eq)]
705#[derive(
706    Clone,
707    PartialEq,
708    ::prost::Message,
709    schemars::JsonSchema,
710    serde::Serialize,
711    serde::Deserialize,
712    desmos_std_derive::CosmwasmExt,
713)]
714#[proto_message(type_url = "/desmos.reactions.v1.QueryRegisteredReactionsResponse")]
715#[serde(rename_all = "snake_case")]
716pub struct QueryRegisteredReactionsResponse {
717    #[prost(message, repeated, tag = "1")]
718    pub registered_reactions: ::prost::alloc::vec::Vec<RegisteredReaction>,
719    #[prost(message, optional, tag = "2")]
720    pub pagination:
721        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
722}
723/// QueryRegisteredReactionRequest is the request type for the
724/// Query/RegisteredReaction RPC method
725#[allow(clippy::derive_partial_eq_without_eq)]
726#[derive(
727    Clone,
728    PartialEq,
729    ::prost::Message,
730    schemars::JsonSchema,
731    serde::Serialize,
732    serde::Deserialize,
733    desmos_std_derive::CosmwasmExt,
734)]
735#[proto_message(type_url = "/desmos.reactions.v1.QueryRegisteredReactionRequest")]
736#[serde(rename_all = "snake_case")]
737#[proto_query(
738    path = "/desmos.reactions.v1.Query/RegisteredReaction",
739    response_type = QueryRegisteredReactionResponse
740)]
741pub struct QueryRegisteredReactionRequest {
742    /// Id of the subspace to query the registered reactions for
743    #[prost(uint64, tag = "1")]
744    #[serde(
745        serialize_with = "crate::serde::as_str::serialize",
746        deserialize_with = "crate::serde::as_str::deserialize"
747    )]
748    pub subspace_id: u64,
749    /// Id of the registered reaction to query for
750    #[prost(uint32, tag = "2")]
751    pub reaction_id: u32,
752}
753/// QueryRegisteredReactionResponse is the response type for the
754/// Query/RegisteredReaction RPC method
755#[allow(clippy::derive_partial_eq_without_eq)]
756#[derive(
757    Clone,
758    PartialEq,
759    ::prost::Message,
760    schemars::JsonSchema,
761    serde::Serialize,
762    serde::Deserialize,
763    desmos_std_derive::CosmwasmExt,
764)]
765#[proto_message(type_url = "/desmos.reactions.v1.QueryRegisteredReactionResponse")]
766#[serde(rename_all = "snake_case")]
767pub struct QueryRegisteredReactionResponse {
768    #[prost(message, optional, tag = "1")]
769    pub registered_reaction: ::core::option::Option<RegisteredReaction>,
770}
771/// QueryReactionsParamsRequest is the request type for the Query/ReactionsParams
772/// RPC method
773#[allow(clippy::derive_partial_eq_without_eq)]
774#[derive(
775    Clone,
776    PartialEq,
777    ::prost::Message,
778    schemars::JsonSchema,
779    serde::Serialize,
780    serde::Deserialize,
781    desmos_std_derive::CosmwasmExt,
782)]
783#[proto_message(type_url = "/desmos.reactions.v1.QueryReactionsParamsRequest")]
784#[serde(rename_all = "snake_case")]
785#[proto_query(
786    path = "/desmos.reactions.v1.Query/ReactionsParams",
787    response_type = QueryReactionsParamsResponse
788)]
789pub struct QueryReactionsParamsRequest {
790    /// Id of the subspace for which to query the params
791    #[prost(uint64, tag = "1")]
792    #[serde(
793        serialize_with = "crate::serde::as_str::serialize",
794        deserialize_with = "crate::serde::as_str::deserialize"
795    )]
796    pub subspace_id: u64,
797}
798/// QueryReactionsParamsResponse is the response type for the
799/// Query/ReactionsParam RPC method
800#[allow(clippy::derive_partial_eq_without_eq)]
801#[derive(
802    Clone,
803    PartialEq,
804    ::prost::Message,
805    schemars::JsonSchema,
806    serde::Serialize,
807    serde::Deserialize,
808    desmos_std_derive::CosmwasmExt,
809)]
810#[proto_message(type_url = "/desmos.reactions.v1.QueryReactionsParamsResponse")]
811#[serde(rename_all = "snake_case")]
812pub struct QueryReactionsParamsResponse {
813    #[prost(message, optional, tag = "1")]
814    pub params: ::core::option::Option<SubspaceReactionsParams>,
815}
816pub struct ReactionsQuerier<'a, Q: cosmwasm_std::CustomQuery> {
817    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
818}
819impl<'a, Q: cosmwasm_std::CustomQuery> ReactionsQuerier<'a, Q> {
820    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
821        Self { querier }
822    }
823    pub fn reactions(
824        &self,
825        subspace_id: u64,
826        post_id: u64,
827        user: ::prost::alloc::string::String,
828        pagination: ::core::option::Option<
829            super::super::super::cosmos::base::query::v1beta1::PageRequest,
830        >,
831    ) -> std::result::Result<QueryReactionsResponse, cosmwasm_std::StdError> {
832        QueryReactionsRequest {
833            subspace_id,
834            post_id,
835            user,
836            pagination,
837        }
838        .query(self.querier)
839    }
840    pub fn reaction(
841        &self,
842        subspace_id: u64,
843        post_id: u64,
844        reaction_id: u32,
845    ) -> std::result::Result<QueryReactionResponse, cosmwasm_std::StdError> {
846        QueryReactionRequest {
847            subspace_id,
848            post_id,
849            reaction_id,
850        }
851        .query(self.querier)
852    }
853    pub fn registered_reactions(
854        &self,
855        subspace_id: u64,
856        pagination: ::core::option::Option<
857            super::super::super::cosmos::base::query::v1beta1::PageRequest,
858        >,
859    ) -> std::result::Result<QueryRegisteredReactionsResponse, cosmwasm_std::StdError> {
860        QueryRegisteredReactionsRequest {
861            subspace_id,
862            pagination,
863        }
864        .query(self.querier)
865    }
866    pub fn registered_reaction(
867        &self,
868        subspace_id: u64,
869        reaction_id: u32,
870    ) -> std::result::Result<QueryRegisteredReactionResponse, cosmwasm_std::StdError> {
871        QueryRegisteredReactionRequest {
872            subspace_id,
873            reaction_id,
874        }
875        .query(self.querier)
876    }
877    pub fn reactions_params(
878        &self,
879        subspace_id: u64,
880    ) -> std::result::Result<QueryReactionsParamsResponse, cosmwasm_std::StdError> {
881        QueryReactionsParamsRequest { subspace_id }.query(self.querier)
882    }
883}