desmos_bindings/proto/desmos/reports/
v1.rs

1/// Report contains the data of a generic report
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(
4    Clone,
5    PartialEq,
6    ::prost::Message,
7    schemars::JsonSchema,
8    serde::Serialize,
9    serde::Deserialize,
10    desmos_std_derive::CosmwasmExt,
11)]
12#[proto_message(type_url = "/desmos.reports.v1.Report")]
13#[serde(rename_all = "snake_case")]
14pub struct Report {
15    /// Id of the subspace for which the report has been created
16    #[prost(uint64, tag = "1")]
17    #[serde(
18        serialize_with = "crate::serde::as_str::serialize",
19        deserialize_with = "crate::serde::as_str::deserialize"
20    )]
21    pub subspace_id: u64,
22    /// Id of the report
23    #[prost(uint64, tag = "2")]
24    #[serde(
25        serialize_with = "crate::serde::as_str::serialize",
26        deserialize_with = "crate::serde::as_str::deserialize"
27    )]
28    pub id: u64,
29    /// Id of the reason this report has been created for
30    #[prost(uint32, repeated, packed = "false", tag = "3")]
31    pub reasons_ids: ::prost::alloc::vec::Vec<u32>,
32    /// (optional) Message attached to this report
33    #[prost(string, tag = "4")]
34    pub message: ::prost::alloc::string::String,
35    /// Address of the reporter
36    #[prost(string, tag = "5")]
37    pub reporter: ::prost::alloc::string::String,
38    /// Target of the report
39    #[prost(message, optional, tag = "6")]
40    pub target: ::core::option::Option<crate::shim::Any>,
41    /// Time in which the report was created
42    #[prost(message, optional, tag = "7")]
43    pub creation_date: ::core::option::Option<crate::shim::Timestamp>,
44}
45/// UserTarget contains the data of a report about a user
46#[allow(clippy::derive_partial_eq_without_eq)]
47#[derive(
48    Clone,
49    PartialEq,
50    ::prost::Message,
51    schemars::JsonSchema,
52    serde::Serialize,
53    serde::Deserialize,
54    desmos_std_derive::CosmwasmExt,
55)]
56#[proto_message(type_url = "/desmos.reports.v1.UserTarget")]
57#[serde(rename_all = "snake_case")]
58pub struct UserTarget {
59    /// Address of the reported user
60    #[prost(string, tag = "1")]
61    pub user: ::prost::alloc::string::String,
62}
63/// PostTarget contains the data of a report about a post
64#[allow(clippy::derive_partial_eq_without_eq)]
65#[derive(
66    Clone,
67    PartialEq,
68    ::prost::Message,
69    schemars::JsonSchema,
70    serde::Serialize,
71    serde::Deserialize,
72    desmos_std_derive::CosmwasmExt,
73)]
74#[proto_message(type_url = "/desmos.reports.v1.PostTarget")]
75#[serde(rename_all = "snake_case")]
76pub struct PostTarget {
77    /// Id of the reported post
78    #[prost(uint64, tag = "1")]
79    #[serde(
80        serialize_with = "crate::serde::as_str::serialize",
81        deserialize_with = "crate::serde::as_str::deserialize"
82    )]
83    pub post_id: u64,
84}
85/// Reason contains the data about a reporting reason
86#[allow(clippy::derive_partial_eq_without_eq)]
87#[derive(
88    Clone,
89    PartialEq,
90    ::prost::Message,
91    schemars::JsonSchema,
92    serde::Serialize,
93    serde::Deserialize,
94    desmos_std_derive::CosmwasmExt,
95)]
96#[proto_message(type_url = "/desmos.reports.v1.Reason")]
97#[serde(rename_all = "snake_case")]
98pub struct Reason {
99    /// Id of the subspace for which this reason is valid
100    #[prost(uint64, tag = "1")]
101    #[serde(
102        serialize_with = "crate::serde::as_str::serialize",
103        deserialize_with = "crate::serde::as_str::deserialize"
104    )]
105    pub subspace_id: u64,
106    /// Id of the reason inside the subspace
107    #[prost(uint32, tag = "2")]
108    pub id: u32,
109    /// Title of the reason
110    #[prost(string, tag = "3")]
111    pub title: ::prost::alloc::string::String,
112    /// (optional) Extended description of the reason and the cases it applies to
113    #[prost(string, tag = "4")]
114    pub description: ::prost::alloc::string::String,
115}
116/// Params contains the module parameters
117#[allow(clippy::derive_partial_eq_without_eq)]
118#[derive(
119    Clone,
120    PartialEq,
121    ::prost::Message,
122    schemars::JsonSchema,
123    serde::Serialize,
124    serde::Deserialize,
125    desmos_std_derive::CosmwasmExt,
126)]
127#[proto_message(type_url = "/desmos.reports.v1.Params")]
128#[serde(rename_all = "snake_case")]
129pub struct Params {
130    /// List of available reasons from which new subspaces can pick their default
131    /// ones
132    #[prost(message, repeated, tag = "1")]
133    pub standard_reasons: ::prost::alloc::vec::Vec<StandardReason>,
134}
135/// StandardReason contains the data of a standard reason that can be picked and
136/// used from different subspaces
137#[allow(clippy::derive_partial_eq_without_eq)]
138#[derive(
139    Clone,
140    PartialEq,
141    ::prost::Message,
142    schemars::JsonSchema,
143    serde::Serialize,
144    serde::Deserialize,
145    desmos_std_derive::CosmwasmExt,
146)]
147#[proto_message(type_url = "/desmos.reports.v1.StandardReason")]
148#[serde(rename_all = "snake_case")]
149pub struct StandardReason {
150    /// Id of the reason inside the subspace
151    #[prost(uint32, tag = "1")]
152    pub id: u32,
153    /// Title of the reason
154    #[prost(string, tag = "2")]
155    pub title: ::prost::alloc::string::String,
156    /// (optional) Extended description of the reason and the cases it applies to
157    #[prost(string, tag = "3")]
158    pub description: ::prost::alloc::string::String,
159}
160/// GenesisState defines the reports module's genesis state.
161#[allow(clippy::derive_partial_eq_without_eq)]
162#[derive(
163    Clone,
164    PartialEq,
165    ::prost::Message,
166    schemars::JsonSchema,
167    serde::Serialize,
168    serde::Deserialize,
169    desmos_std_derive::CosmwasmExt,
170)]
171#[proto_message(type_url = "/desmos.reports.v1.GenesisState")]
172#[serde(rename_all = "snake_case")]
173pub struct GenesisState {
174    #[prost(message, repeated, tag = "1")]
175    pub subspaces_data: ::prost::alloc::vec::Vec<SubspaceDataEntry>,
176    #[prost(message, repeated, tag = "2")]
177    pub reasons: ::prost::alloc::vec::Vec<Reason>,
178    #[prost(message, repeated, tag = "3")]
179    pub reports: ::prost::alloc::vec::Vec<Report>,
180    #[prost(message, optional, tag = "4")]
181    pub params: ::core::option::Option<Params>,
182}
183/// SubspaceDataEntry contains the data related to a single subspace
184#[allow(clippy::derive_partial_eq_without_eq)]
185#[derive(
186    Clone,
187    PartialEq,
188    ::prost::Message,
189    schemars::JsonSchema,
190    serde::Serialize,
191    serde::Deserialize,
192    desmos_std_derive::CosmwasmExt,
193)]
194#[proto_message(type_url = "/desmos.reports.v1.SubspaceDataEntry")]
195#[serde(rename_all = "snake_case")]
196pub struct SubspaceDataEntry {
197    /// Id of the subspace to which the data relates
198    #[prost(uint64, tag = "1")]
199    #[serde(
200        serialize_with = "crate::serde::as_str::serialize",
201        deserialize_with = "crate::serde::as_str::deserialize"
202    )]
203    pub subspace_id: u64,
204    /// Id of the next reason inside the subspace
205    #[prost(uint32, tag = "2")]
206    pub reason_id: u32,
207    /// Id of the next report inside the subspace
208    #[prost(uint64, tag = "3")]
209    #[serde(
210        serialize_with = "crate::serde::as_str::serialize",
211        deserialize_with = "crate::serde::as_str::deserialize"
212    )]
213    pub report_id: u64,
214}
215/// MsgCreateReport represents the message to be used to create a report
216#[allow(clippy::derive_partial_eq_without_eq)]
217#[derive(
218    Clone,
219    PartialEq,
220    ::prost::Message,
221    schemars::JsonSchema,
222    serde::Serialize,
223    serde::Deserialize,
224    desmos_std_derive::CosmwasmExt,
225)]
226#[proto_message(type_url = "/desmos.reports.v1.MsgCreateReport")]
227#[serde(rename_all = "snake_case")]
228pub struct MsgCreateReport {
229    /// Id of the subspace for which the report should be stored
230    #[prost(uint64, tag = "1")]
231    #[serde(
232        serialize_with = "crate::serde::as_str::serialize",
233        deserialize_with = "crate::serde::as_str::deserialize"
234    )]
235    pub subspace_id: u64,
236    /// Id of the reason this report has been created for
237    #[prost(uint32, repeated, packed = "false", tag = "2")]
238    pub reasons_ids: ::prost::alloc::vec::Vec<u32>,
239    /// (optional) Message attached to this report
240    #[prost(string, tag = "3")]
241    pub message: ::prost::alloc::string::String,
242    /// Address of the reporter
243    #[prost(string, tag = "4")]
244    pub reporter: ::prost::alloc::string::String,
245    /// Target of the report
246    #[prost(message, optional, tag = "5")]
247    pub target: ::core::option::Option<crate::shim::Any>,
248}
249/// MsgCreateReportResponse represents the Msg/CreateReport response type
250#[allow(clippy::derive_partial_eq_without_eq)]
251#[derive(
252    Clone,
253    PartialEq,
254    ::prost::Message,
255    schemars::JsonSchema,
256    serde::Serialize,
257    serde::Deserialize,
258    desmos_std_derive::CosmwasmExt,
259)]
260#[proto_message(type_url = "/desmos.reports.v1.MsgCreateReportResponse")]
261#[serde(rename_all = "snake_case")]
262pub struct MsgCreateReportResponse {
263    /// Id of the newly created report
264    #[prost(uint64, tag = "1")]
265    #[serde(
266        serialize_with = "crate::serde::as_str::serialize",
267        deserialize_with = "crate::serde::as_str::deserialize"
268    )]
269    pub report_id: u64,
270    /// Time in which the report was created
271    #[prost(message, optional, tag = "2")]
272    pub creation_date: ::core::option::Option<crate::shim::Timestamp>,
273}
274/// MsgDeleteReport represents the message to be used when deleting a report
275#[allow(clippy::derive_partial_eq_without_eq)]
276#[derive(
277    Clone,
278    PartialEq,
279    ::prost::Message,
280    schemars::JsonSchema,
281    serde::Serialize,
282    serde::Deserialize,
283    desmos_std_derive::CosmwasmExt,
284)]
285#[proto_message(type_url = "/desmos.reports.v1.MsgDeleteReport")]
286#[serde(rename_all = "snake_case")]
287pub struct MsgDeleteReport {
288    /// Id of the subspace that contains the report to be deleted
289    #[prost(uint64, tag = "1")]
290    #[serde(
291        serialize_with = "crate::serde::as_str::serialize",
292        deserialize_with = "crate::serde::as_str::deserialize"
293    )]
294    pub subspace_id: u64,
295    /// Id of the report to be deleted
296    #[prost(uint64, tag = "2")]
297    #[serde(
298        serialize_with = "crate::serde::as_str::serialize",
299        deserialize_with = "crate::serde::as_str::deserialize"
300    )]
301    pub report_id: u64,
302    /// Address of the user deleting the report
303    #[prost(string, tag = "3")]
304    pub signer: ::prost::alloc::string::String,
305}
306/// MsgDeleteReportResponse represents the Msg/DeleteReport response type
307#[allow(clippy::derive_partial_eq_without_eq)]
308#[derive(
309    Clone,
310    PartialEq,
311    ::prost::Message,
312    schemars::JsonSchema,
313    serde::Serialize,
314    serde::Deserialize,
315    desmos_std_derive::CosmwasmExt,
316)]
317#[proto_message(type_url = "/desmos.reports.v1.MsgDeleteReportResponse")]
318#[serde(rename_all = "snake_case")]
319pub struct MsgDeleteReportResponse {}
320/// MsgSupportStandardReason represents the message to be used when wanting to
321/// support one reason from the module params
322#[allow(clippy::derive_partial_eq_without_eq)]
323#[derive(
324    Clone,
325    PartialEq,
326    ::prost::Message,
327    schemars::JsonSchema,
328    serde::Serialize,
329    serde::Deserialize,
330    desmos_std_derive::CosmwasmExt,
331)]
332#[proto_message(type_url = "/desmos.reports.v1.MsgSupportStandardReason")]
333#[serde(rename_all = "snake_case")]
334pub struct MsgSupportStandardReason {
335    /// Id of the subspace for which to support the reason
336    #[prost(uint64, tag = "1")]
337    #[serde(
338        serialize_with = "crate::serde::as_str::serialize",
339        deserialize_with = "crate::serde::as_str::deserialize"
340    )]
341    pub subspace_id: u64,
342    /// Id of the reason that should be supported
343    #[prost(uint32, tag = "2")]
344    pub standard_reason_id: u32,
345    /// Address of the user signing the message
346    #[prost(string, tag = "3")]
347    pub signer: ::prost::alloc::string::String,
348}
349/// MsgSupportStandardReasonResponse represents the Msg/SupportStandardReason
350/// response type
351#[allow(clippy::derive_partial_eq_without_eq)]
352#[derive(
353    Clone,
354    PartialEq,
355    ::prost::Message,
356    schemars::JsonSchema,
357    serde::Serialize,
358    serde::Deserialize,
359    desmos_std_derive::CosmwasmExt,
360)]
361#[proto_message(type_url = "/desmos.reports.v1.MsgSupportStandardReasonResponse")]
362#[serde(rename_all = "snake_case")]
363pub struct MsgSupportStandardReasonResponse {
364    /// Id of the newly added reason
365    #[prost(uint32, tag = "1")]
366    pub reasons_ids: u32,
367}
368/// MsgAddReason represents the message to be used when adding a new supported
369/// reason
370#[allow(clippy::derive_partial_eq_without_eq)]
371#[derive(
372    Clone,
373    PartialEq,
374    ::prost::Message,
375    schemars::JsonSchema,
376    serde::Serialize,
377    serde::Deserialize,
378    desmos_std_derive::CosmwasmExt,
379)]
380#[proto_message(type_url = "/desmos.reports.v1.MsgAddReason")]
381#[serde(rename_all = "snake_case")]
382pub struct MsgAddReason {
383    /// Id of the subspace for which to add the reason
384    #[prost(uint64, tag = "1")]
385    #[serde(
386        serialize_with = "crate::serde::as_str::serialize",
387        deserialize_with = "crate::serde::as_str::deserialize"
388    )]
389    pub subspace_id: u64,
390    /// Title of the reason
391    #[prost(string, tag = "2")]
392    pub title: ::prost::alloc::string::String,
393    /// (optional) Extended description of the reason and the cases it applies to
394    #[prost(string, tag = "3")]
395    pub description: ::prost::alloc::string::String,
396    /// Address of the user adding the supported reason
397    #[prost(string, tag = "4")]
398    pub signer: ::prost::alloc::string::String,
399}
400/// MsgAddReasonResponse represents the Msg/AddReason response type
401#[allow(clippy::derive_partial_eq_without_eq)]
402#[derive(
403    Clone,
404    PartialEq,
405    ::prost::Message,
406    schemars::JsonSchema,
407    serde::Serialize,
408    serde::Deserialize,
409    desmos_std_derive::CosmwasmExt,
410)]
411#[proto_message(type_url = "/desmos.reports.v1.MsgAddReasonResponse")]
412#[serde(rename_all = "snake_case")]
413pub struct MsgAddReasonResponse {
414    /// Id of the newly supported reason
415    #[prost(uint32, tag = "1")]
416    pub reason_id: u32,
417}
418/// MsgRemoveReason represents the message to be used when removing an exiting
419/// reporting reason
420#[allow(clippy::derive_partial_eq_without_eq)]
421#[derive(
422    Clone,
423    PartialEq,
424    ::prost::Message,
425    schemars::JsonSchema,
426    serde::Serialize,
427    serde::Deserialize,
428    desmos_std_derive::CosmwasmExt,
429)]
430#[proto_message(type_url = "/desmos.reports.v1.MsgRemoveReason")]
431#[serde(rename_all = "snake_case")]
432pub struct MsgRemoveReason {
433    /// Id of the subspace from which to remove the reason
434    #[prost(uint64, tag = "1")]
435    #[serde(
436        serialize_with = "crate::serde::as_str::serialize",
437        deserialize_with = "crate::serde::as_str::deserialize"
438    )]
439    pub subspace_id: u64,
440    /// Id of the reason to be deleted
441    #[prost(uint32, tag = "2")]
442    pub reason_id: u32,
443    /// Address of the user adding the supported reason
444    #[prost(string, tag = "3")]
445    pub signer: ::prost::alloc::string::String,
446}
447/// MsgRemoveReasonResponse represents the Msg/RemoveReason response type
448#[allow(clippy::derive_partial_eq_without_eq)]
449#[derive(
450    Clone,
451    PartialEq,
452    ::prost::Message,
453    schemars::JsonSchema,
454    serde::Serialize,
455    serde::Deserialize,
456    desmos_std_derive::CosmwasmExt,
457)]
458#[proto_message(type_url = "/desmos.reports.v1.MsgRemoveReasonResponse")]
459#[serde(rename_all = "snake_case")]
460pub struct MsgRemoveReasonResponse {}
461/// MsgUpdateParams is the Msg/UpdateParams request type.
462///
463/// Since: Desmos 5.0.0
464#[allow(clippy::derive_partial_eq_without_eq)]
465#[derive(
466    Clone,
467    PartialEq,
468    ::prost::Message,
469    schemars::JsonSchema,
470    serde::Serialize,
471    serde::Deserialize,
472    desmos_std_derive::CosmwasmExt,
473)]
474#[proto_message(type_url = "/desmos.reports.v1.MsgUpdateParams")]
475#[serde(rename_all = "snake_case")]
476pub struct MsgUpdateParams {
477    /// authority is the address that controls the module (defaults to x/gov unless
478    /// overwritten).
479    #[prost(string, tag = "1")]
480    pub authority: ::prost::alloc::string::String,
481    /// params defines the parameters to update.
482    ///
483    /// NOTE: All parameters must be supplied.
484    #[prost(message, optional, tag = "2")]
485    pub params: ::core::option::Option<Params>,
486}
487/// MsgUpdateParamsResponse defines the response structure for executing a
488/// MsgUpdateParams message.
489///
490/// Since: Desmos 5.0.0
491#[allow(clippy::derive_partial_eq_without_eq)]
492#[derive(
493    Clone,
494    PartialEq,
495    ::prost::Message,
496    schemars::JsonSchema,
497    serde::Serialize,
498    serde::Deserialize,
499    desmos_std_derive::CosmwasmExt,
500)]
501#[proto_message(type_url = "/desmos.reports.v1.MsgUpdateParamsResponse")]
502#[serde(rename_all = "snake_case")]
503pub struct MsgUpdateParamsResponse {}
504/// QueryReportsResponse is the request type for Query/Reports RPC method
505#[allow(clippy::derive_partial_eq_without_eq)]
506#[derive(
507    Clone,
508    PartialEq,
509    ::prost::Message,
510    schemars::JsonSchema,
511    serde::Serialize,
512    serde::Deserialize,
513    desmos_std_derive::CosmwasmExt,
514)]
515#[proto_message(type_url = "/desmos.reports.v1.QueryReportsRequest")]
516#[serde(rename_all = "snake_case")]
517#[proto_query(
518    path = "/desmos.reports.v1.Query/Reports",
519    response_type = QueryReportsResponse
520)]
521pub struct QueryReportsRequest {
522    /// Id of the subspace to query the reports for
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    /// (optional) Target to query the reports for
530    #[prost(message, optional, tag = "2")]
531    pub target: ::core::option::Option<crate::shim::Any>,
532    /// (optional) User that reported the target.
533    /// This is going to be used only if the target is also specified
534    #[prost(string, tag = "3")]
535    pub reporter: ::prost::alloc::string::String,
536    /// pagination defines an optional pagination for the request.
537    #[prost(message, optional, tag = "4")]
538    pub pagination:
539        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
540}
541/// QueryReportsResponse is the response type for Query/Reports RPC method
542#[allow(clippy::derive_partial_eq_without_eq)]
543#[derive(
544    Clone,
545    PartialEq,
546    ::prost::Message,
547    schemars::JsonSchema,
548    serde::Serialize,
549    serde::Deserialize,
550    desmos_std_derive::CosmwasmExt,
551)]
552#[proto_message(type_url = "/desmos.reports.v1.QueryReportsResponse")]
553#[serde(rename_all = "snake_case")]
554pub struct QueryReportsResponse {
555    #[prost(message, repeated, tag = "1")]
556    pub reports: ::prost::alloc::vec::Vec<Report>,
557    #[prost(message, optional, tag = "2")]
558    pub pagination:
559        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
560}
561/// QueryReportRequest is the request type for Query/Report RPC method
562#[allow(clippy::derive_partial_eq_without_eq)]
563#[derive(
564    Clone,
565    PartialEq,
566    ::prost::Message,
567    schemars::JsonSchema,
568    serde::Serialize,
569    serde::Deserialize,
570    desmos_std_derive::CosmwasmExt,
571)]
572#[proto_message(type_url = "/desmos.reports.v1.QueryReportRequest")]
573#[serde(rename_all = "snake_case")]
574#[proto_query(
575    path = "/desmos.reports.v1.Query/Report",
576    response_type = QueryReportResponse
577)]
578pub struct QueryReportRequest {
579    /// Id of the subspace that holds the report to query for
580    #[prost(uint64, tag = "1")]
581    #[serde(
582        serialize_with = "crate::serde::as_str::serialize",
583        deserialize_with = "crate::serde::as_str::deserialize"
584    )]
585    pub subspace_id: u64,
586    /// Id of the report to query for
587    #[prost(uint64, tag = "2")]
588    #[serde(
589        serialize_with = "crate::serde::as_str::serialize",
590        deserialize_with = "crate::serde::as_str::deserialize"
591    )]
592    pub report_id: u64,
593}
594/// QueryReportResponse is the response type for Query/Report RPC method
595#[allow(clippy::derive_partial_eq_without_eq)]
596#[derive(
597    Clone,
598    PartialEq,
599    ::prost::Message,
600    schemars::JsonSchema,
601    serde::Serialize,
602    serde::Deserialize,
603    desmos_std_derive::CosmwasmExt,
604)]
605#[proto_message(type_url = "/desmos.reports.v1.QueryReportResponse")]
606#[serde(rename_all = "snake_case")]
607pub struct QueryReportResponse {
608    #[prost(message, optional, tag = "1")]
609    pub report: ::core::option::Option<Report>,
610}
611/// QueryReasonsRequest is the request type for Query/Reasons RPC method
612#[allow(clippy::derive_partial_eq_without_eq)]
613#[derive(
614    Clone,
615    PartialEq,
616    ::prost::Message,
617    schemars::JsonSchema,
618    serde::Serialize,
619    serde::Deserialize,
620    desmos_std_derive::CosmwasmExt,
621)]
622#[proto_message(type_url = "/desmos.reports.v1.QueryReasonsRequest")]
623#[serde(rename_all = "snake_case")]
624#[proto_query(
625    path = "/desmos.reports.v1.Query/Reasons",
626    response_type = QueryReasonsResponse
627)]
628pub struct QueryReasonsRequest {
629    /// Id of the subspace to query the supported reporting reasons for
630    #[prost(uint64, tag = "1")]
631    #[serde(
632        serialize_with = "crate::serde::as_str::serialize",
633        deserialize_with = "crate::serde::as_str::deserialize"
634    )]
635    pub subspace_id: u64,
636    /// pagination defines an optional pagination for the request.
637    #[prost(message, optional, tag = "3")]
638    pub pagination:
639        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
640}
641/// QueryReasonsResponse is the response type for Query/Reasons RPC method
642#[allow(clippy::derive_partial_eq_without_eq)]
643#[derive(
644    Clone,
645    PartialEq,
646    ::prost::Message,
647    schemars::JsonSchema,
648    serde::Serialize,
649    serde::Deserialize,
650    desmos_std_derive::CosmwasmExt,
651)]
652#[proto_message(type_url = "/desmos.reports.v1.QueryReasonsResponse")]
653#[serde(rename_all = "snake_case")]
654pub struct QueryReasonsResponse {
655    #[prost(message, repeated, tag = "1")]
656    pub reasons: ::prost::alloc::vec::Vec<Reason>,
657    #[prost(message, optional, tag = "2")]
658    pub pagination:
659        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
660}
661/// QueryReasonRequest is the request type for Query/Reason RPC method
662#[allow(clippy::derive_partial_eq_without_eq)]
663#[derive(
664    Clone,
665    PartialEq,
666    ::prost::Message,
667    schemars::JsonSchema,
668    serde::Serialize,
669    serde::Deserialize,
670    desmos_std_derive::CosmwasmExt,
671)]
672#[proto_message(type_url = "/desmos.reports.v1.QueryReasonRequest")]
673#[serde(rename_all = "snake_case")]
674#[proto_query(
675    path = "/desmos.reports.v1.Query/Reason",
676    response_type = QueryReasonResponse
677)]
678pub struct QueryReasonRequest {
679    /// Id of the subspace that holds the reason to query for
680    #[prost(uint64, tag = "1")]
681    #[serde(
682        serialize_with = "crate::serde::as_str::serialize",
683        deserialize_with = "crate::serde::as_str::deserialize"
684    )]
685    pub subspace_id: u64,
686    /// Id of the reason to query for
687    #[prost(uint32, tag = "2")]
688    pub reason_id: u32,
689}
690/// QueryReasonResponse is the response type for Query/Reason RPC method
691#[allow(clippy::derive_partial_eq_without_eq)]
692#[derive(
693    Clone,
694    PartialEq,
695    ::prost::Message,
696    schemars::JsonSchema,
697    serde::Serialize,
698    serde::Deserialize,
699    desmos_std_derive::CosmwasmExt,
700)]
701#[proto_message(type_url = "/desmos.reports.v1.QueryReasonResponse")]
702#[serde(rename_all = "snake_case")]
703pub struct QueryReasonResponse {
704    #[prost(message, optional, tag = "1")]
705    pub reason: ::core::option::Option<Reason>,
706}
707/// QueryParamsRequest is the request type for Query/Params RPC method
708#[allow(clippy::derive_partial_eq_without_eq)]
709#[derive(
710    Clone,
711    PartialEq,
712    ::prost::Message,
713    schemars::JsonSchema,
714    serde::Serialize,
715    serde::Deserialize,
716    desmos_std_derive::CosmwasmExt,
717)]
718#[proto_message(type_url = "/desmos.reports.v1.QueryParamsRequest")]
719#[serde(rename_all = "snake_case")]
720#[proto_query(
721    path = "/desmos.reports.v1.Query/Params",
722    response_type = QueryParamsResponse
723)]
724pub struct QueryParamsRequest {}
725/// QueryParamsResponse is the response type for Query/Params RPC method
726#[allow(clippy::derive_partial_eq_without_eq)]
727#[derive(
728    Clone,
729    PartialEq,
730    ::prost::Message,
731    schemars::JsonSchema,
732    serde::Serialize,
733    serde::Deserialize,
734    desmos_std_derive::CosmwasmExt,
735)]
736#[proto_message(type_url = "/desmos.reports.v1.QueryParamsResponse")]
737#[serde(rename_all = "snake_case")]
738pub struct QueryParamsResponse {
739    #[prost(message, optional, tag = "1")]
740    pub params: ::core::option::Option<Params>,
741}
742pub struct ReportsQuerier<'a, Q: cosmwasm_std::CustomQuery> {
743    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
744}
745impl<'a, Q: cosmwasm_std::CustomQuery> ReportsQuerier<'a, Q> {
746    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
747        Self { querier }
748    }
749    pub fn reports(
750        &self,
751        subspace_id: u64,
752        target: ::core::option::Option<crate::shim::Any>,
753        reporter: ::prost::alloc::string::String,
754        pagination: ::core::option::Option<
755            super::super::super::cosmos::base::query::v1beta1::PageRequest,
756        >,
757    ) -> std::result::Result<QueryReportsResponse, cosmwasm_std::StdError> {
758        QueryReportsRequest {
759            subspace_id,
760            target,
761            reporter,
762            pagination,
763        }
764        .query(self.querier)
765    }
766    pub fn report(
767        &self,
768        subspace_id: u64,
769        report_id: u64,
770    ) -> std::result::Result<QueryReportResponse, cosmwasm_std::StdError> {
771        QueryReportRequest {
772            subspace_id,
773            report_id,
774        }
775        .query(self.querier)
776    }
777    pub fn reasons(
778        &self,
779        subspace_id: u64,
780        pagination: ::core::option::Option<
781            super::super::super::cosmos::base::query::v1beta1::PageRequest,
782        >,
783    ) -> std::result::Result<QueryReasonsResponse, cosmwasm_std::StdError> {
784        QueryReasonsRequest {
785            subspace_id,
786            pagination,
787        }
788        .query(self.querier)
789    }
790    pub fn reason(
791        &self,
792        subspace_id: u64,
793        reason_id: u32,
794    ) -> std::result::Result<QueryReasonResponse, cosmwasm_std::StdError> {
795        QueryReasonRequest {
796            subspace_id,
797            reason_id,
798        }
799        .query(self.querier)
800    }
801    pub fn params(&self) -> std::result::Result<QueryParamsResponse, cosmwasm_std::StdError> {
802        QueryParamsRequest {}.query(self.querier)
803    }
804}