synd_term/client/synd_api/generated/
query.rs

1#![allow(clippy::all, warnings)]
2pub struct Subscription;
3pub mod subscription {
4    #![allow(dead_code)]
5    use std::result::Result;
6    pub const OPERATION_NAME: &str = "Subscription";
7    pub const QUERY : & str = "query Subscription($after: String, $first: Int) {\n  output: subscription {\n    feeds(after: $after, first: $first) {\n      nodes {\n        ...Feed\n      }\n      pageInfo {\n        ...PageInfo\n      }\n      errors {\n        url\n        errorMessage\n      }\n    }\n  }\n}\n\nfragment Feed on Feed {\n  id\n  type\n  title\n  url\n  updated\n  websiteUrl\n  description\n  generator\n  requirement\n  category\n  entries(first: 10) {\n    nodes {\n      ...EntryMeta\n    }\n  }\n  links {\n    nodes {\n      ...Link\n    }\n  }\n  authors {\n    nodes\n  }\n}\n\nfragment EntryMeta on Entry {\n    title\n    published\n    updated\n    summary\n}\n\nfragment Link on Link {\n  href\n  rel\n  mediaType\n  title  \n}\n\nquery Entries($after: String, $first: Int!) {\n  output: subscription {\n    entries(after: $after, first: $first) {\n      nodes {\n        ...Entry\n      }\n      pageInfo {\n        ...PageInfo\n      }\n    }\n  }\n}\n\nfragment Entry on Entry {\n  title\n  published\n  updated\n  summary\n  websiteUrl\n  feed {\n    ...FeedMeta\n  }\n}\n\nfragment FeedMeta on FeedMeta {\n  title\n  url\n  requirement\n  category\n}\n\nfragment PageInfo on PageInfo {\n  hasNextPage\n  endCursor\n}\n\nquery ExportSubscription($after: String, $first: Int!) {\n  output: subscription {\n    feeds(after: $after, first: $first) {\n      pageInfo {\n        hasNextPage\n        endCursor\n      }\n      nodes {\n        title\n        url\n        description\n        requirement\n        category\n      }\n    }\n  }\n}\n" ;
8    use super::*;
9    use serde::{Deserialize, Serialize};
10    #[allow(dead_code)]
11    type Boolean = bool;
12    #[allow(dead_code)]
13    type Float = f64;
14    #[allow(dead_code)]
15    type Int = i64;
16    #[allow(dead_code)]
17    type ID = String;
18    type Category = crate::client::synd_api::scalar::Category;
19    type FeedUrl = crate::client::synd_api::scalar::FeedUrl;
20    type Rfc3339Time = crate::client::synd_api::scalar::Rfc3339Time;
21    #[derive(Clone, Debug, Eq, PartialEq)]
22    pub enum FeedType {
23        ATOM,
24        JSON,
25        RSS0,
26        RSS1,
27        RSS2,
28        Other(String),
29    }
30    impl ::serde::Serialize for FeedType {
31        fn serialize<S: serde::Serializer>(&self, ser: S) -> Result<S::Ok, S::Error> {
32            ser.serialize_str(match *self {
33                FeedType::ATOM => "ATOM",
34                FeedType::JSON => "JSON",
35                FeedType::RSS0 => "RSS0",
36                FeedType::RSS1 => "RSS1",
37                FeedType::RSS2 => "RSS2",
38                FeedType::Other(ref s) => &s,
39            })
40        }
41    }
42    impl<'de> ::serde::Deserialize<'de> for FeedType {
43        fn deserialize<D: ::serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
44            let s: String = ::serde::Deserialize::deserialize(deserializer)?;
45            match s.as_str() {
46                "ATOM" => Ok(FeedType::ATOM),
47                "JSON" => Ok(FeedType::JSON),
48                "RSS0" => Ok(FeedType::RSS0),
49                "RSS1" => Ok(FeedType::RSS1),
50                "RSS2" => Ok(FeedType::RSS2),
51                _ => Ok(FeedType::Other(s)),
52            }
53        }
54    }
55    #[derive(Clone, Debug, Eq, PartialEq)]
56    pub enum Requirement {
57        MUST,
58        SHOULD,
59        MAY,
60        Other(String),
61    }
62    impl ::serde::Serialize for Requirement {
63        fn serialize<S: serde::Serializer>(&self, ser: S) -> Result<S::Ok, S::Error> {
64            ser.serialize_str(match *self {
65                Requirement::MUST => "MUST",
66                Requirement::SHOULD => "SHOULD",
67                Requirement::MAY => "MAY",
68                Requirement::Other(ref s) => &s,
69            })
70        }
71    }
72    impl<'de> ::serde::Deserialize<'de> for Requirement {
73        fn deserialize<D: ::serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
74            let s: String = ::serde::Deserialize::deserialize(deserializer)?;
75            match s.as_str() {
76                "MUST" => Ok(Requirement::MUST),
77                "SHOULD" => Ok(Requirement::SHOULD),
78                "MAY" => Ok(Requirement::MAY),
79                _ => Ok(Requirement::Other(s)),
80            }
81        }
82    }
83    #[derive(Serialize, Debug, Clone, PartialEq, Eq)]
84    pub struct Variables {
85        pub after: Option<String>,
86        pub first: Option<Int>,
87    }
88    impl Variables {}
89    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
90    pub struct Feed {
91        pub id: ID,
92        #[serde(rename = "type")]
93        pub type_: FeedType,
94        pub title: Option<String>,
95        pub url: FeedUrl,
96        pub updated: Option<Rfc3339Time>,
97        #[serde(rename = "websiteUrl")]
98        pub website_url: Option<String>,
99        pub description: Option<String>,
100        pub generator: Option<String>,
101        pub requirement: Option<Requirement>,
102        pub category: Option<Category>,
103        pub entries: FeedEntries,
104        pub links: FeedLinks,
105        pub authors: FeedAuthors,
106    }
107    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
108    pub struct FeedEntries {
109        pub nodes: Vec<FeedEntriesNodes>,
110    }
111    pub type FeedEntriesNodes = EntryMeta;
112    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
113    pub struct FeedLinks {
114        pub nodes: Vec<FeedLinksNodes>,
115    }
116    pub type FeedLinksNodes = Link;
117    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
118    pub struct FeedAuthors {
119        pub nodes: Vec<String>,
120    }
121    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
122    pub struct EntryMeta {
123        pub title: Option<String>,
124        pub published: Option<Rfc3339Time>,
125        pub updated: Option<Rfc3339Time>,
126        pub summary: Option<String>,
127    }
128    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
129    pub struct Link {
130        pub href: String,
131        pub rel: Option<String>,
132        #[serde(rename = "mediaType")]
133        pub media_type: Option<String>,
134        pub title: Option<String>,
135    }
136    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
137    pub struct PageInfo {
138        #[serde(rename = "hasNextPage")]
139        pub has_next_page: Boolean,
140        #[serde(rename = "endCursor")]
141        pub end_cursor: Option<String>,
142    }
143    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
144    pub struct ResponseData {
145        pub output: SubscriptionOutput,
146    }
147    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
148    pub struct SubscriptionOutput {
149        pub feeds: SubscriptionOutputFeeds,
150    }
151    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
152    pub struct SubscriptionOutputFeeds {
153        pub nodes: Vec<SubscriptionOutputFeedsNodes>,
154        #[serde(rename = "pageInfo")]
155        pub page_info: SubscriptionOutputFeedsPageInfo,
156        pub errors: Vec<SubscriptionOutputFeedsErrors>,
157    }
158    pub type SubscriptionOutputFeedsNodes = Feed;
159    pub type SubscriptionOutputFeedsPageInfo = PageInfo;
160    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
161    pub struct SubscriptionOutputFeedsErrors {
162        pub url: FeedUrl,
163        #[serde(rename = "errorMessage")]
164        pub error_message: String,
165    }
166}
167impl graphql_client::GraphQLQuery for Subscription {
168    type Variables = subscription::Variables;
169    type ResponseData = subscription::ResponseData;
170    fn build_query(variables: Self::Variables) -> ::graphql_client::QueryBody<Self::Variables> {
171        graphql_client::QueryBody {
172            variables,
173            query: subscription::QUERY,
174            operation_name: subscription::OPERATION_NAME,
175        }
176    }
177}
178pub struct Entries;
179pub mod entries {
180    #![allow(dead_code)]
181    use std::result::Result;
182    pub const OPERATION_NAME: &str = "Entries";
183    pub const QUERY : & str = "query Subscription($after: String, $first: Int) {\n  output: subscription {\n    feeds(after: $after, first: $first) {\n      nodes {\n        ...Feed\n      }\n      pageInfo {\n        ...PageInfo\n      }\n      errors {\n        url\n        errorMessage\n      }\n    }\n  }\n}\n\nfragment Feed on Feed {\n  id\n  type\n  title\n  url\n  updated\n  websiteUrl\n  description\n  generator\n  requirement\n  category\n  entries(first: 10) {\n    nodes {\n      ...EntryMeta\n    }\n  }\n  links {\n    nodes {\n      ...Link\n    }\n  }\n  authors {\n    nodes\n  }\n}\n\nfragment EntryMeta on Entry {\n    title\n    published\n    updated\n    summary\n}\n\nfragment Link on Link {\n  href\n  rel\n  mediaType\n  title  \n}\n\nquery Entries($after: String, $first: Int!) {\n  output: subscription {\n    entries(after: $after, first: $first) {\n      nodes {\n        ...Entry\n      }\n      pageInfo {\n        ...PageInfo\n      }\n    }\n  }\n}\n\nfragment Entry on Entry {\n  title\n  published\n  updated\n  summary\n  websiteUrl\n  feed {\n    ...FeedMeta\n  }\n}\n\nfragment FeedMeta on FeedMeta {\n  title\n  url\n  requirement\n  category\n}\n\nfragment PageInfo on PageInfo {\n  hasNextPage\n  endCursor\n}\n\nquery ExportSubscription($after: String, $first: Int!) {\n  output: subscription {\n    feeds(after: $after, first: $first) {\n      pageInfo {\n        hasNextPage\n        endCursor\n      }\n      nodes {\n        title\n        url\n        description\n        requirement\n        category\n      }\n    }\n  }\n}\n" ;
184    use super::*;
185    use serde::{Deserialize, Serialize};
186    #[allow(dead_code)]
187    type Boolean = bool;
188    #[allow(dead_code)]
189    type Float = f64;
190    #[allow(dead_code)]
191    type Int = i64;
192    #[allow(dead_code)]
193    type ID = String;
194    type Category = crate::client::synd_api::scalar::Category;
195    type FeedUrl = crate::client::synd_api::scalar::FeedUrl;
196    type Rfc3339Time = crate::client::synd_api::scalar::Rfc3339Time;
197    #[derive(Clone, Debug, Eq, PartialEq)]
198    pub enum Requirement {
199        MUST,
200        SHOULD,
201        MAY,
202        Other(String),
203    }
204    impl ::serde::Serialize for Requirement {
205        fn serialize<S: serde::Serializer>(&self, ser: S) -> Result<S::Ok, S::Error> {
206            ser.serialize_str(match *self {
207                Requirement::MUST => "MUST",
208                Requirement::SHOULD => "SHOULD",
209                Requirement::MAY => "MAY",
210                Requirement::Other(ref s) => &s,
211            })
212        }
213    }
214    impl<'de> ::serde::Deserialize<'de> for Requirement {
215        fn deserialize<D: ::serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
216            let s: String = ::serde::Deserialize::deserialize(deserializer)?;
217            match s.as_str() {
218                "MUST" => Ok(Requirement::MUST),
219                "SHOULD" => Ok(Requirement::SHOULD),
220                "MAY" => Ok(Requirement::MAY),
221                _ => Ok(Requirement::Other(s)),
222            }
223        }
224    }
225    #[derive(Serialize, Debug, Clone, PartialEq, Eq)]
226    pub struct Variables {
227        pub after: Option<String>,
228        pub first: Int,
229    }
230    impl Variables {}
231    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
232    pub struct Entry {
233        pub title: Option<String>,
234        pub published: Option<Rfc3339Time>,
235        pub updated: Option<Rfc3339Time>,
236        pub summary: Option<String>,
237        #[serde(rename = "websiteUrl")]
238        pub website_url: Option<String>,
239        pub feed: EntryFeed,
240    }
241    pub type EntryFeed = FeedMeta;
242    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
243    pub struct FeedMeta {
244        pub title: Option<String>,
245        pub url: FeedUrl,
246        pub requirement: Option<Requirement>,
247        pub category: Option<Category>,
248    }
249    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
250    pub struct PageInfo {
251        #[serde(rename = "hasNextPage")]
252        pub has_next_page: Boolean,
253        #[serde(rename = "endCursor")]
254        pub end_cursor: Option<String>,
255    }
256    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
257    pub struct ResponseData {
258        pub output: EntriesOutput,
259    }
260    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
261    pub struct EntriesOutput {
262        pub entries: EntriesOutputEntries,
263    }
264    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
265    pub struct EntriesOutputEntries {
266        pub nodes: Vec<EntriesOutputEntriesNodes>,
267        #[serde(rename = "pageInfo")]
268        pub page_info: EntriesOutputEntriesPageInfo,
269    }
270    pub type EntriesOutputEntriesNodes = Entry;
271    pub type EntriesOutputEntriesPageInfo = PageInfo;
272}
273impl graphql_client::GraphQLQuery for Entries {
274    type Variables = entries::Variables;
275    type ResponseData = entries::ResponseData;
276    fn build_query(variables: Self::Variables) -> ::graphql_client::QueryBody<Self::Variables> {
277        graphql_client::QueryBody {
278            variables,
279            query: entries::QUERY,
280            operation_name: entries::OPERATION_NAME,
281        }
282    }
283}
284pub struct ExportSubscription;
285pub mod export_subscription {
286    #![allow(dead_code)]
287    use std::result::Result;
288    pub const OPERATION_NAME: &str = "ExportSubscription";
289    pub const QUERY : & str = "query Subscription($after: String, $first: Int) {\n  output: subscription {\n    feeds(after: $after, first: $first) {\n      nodes {\n        ...Feed\n      }\n      pageInfo {\n        ...PageInfo\n      }\n      errors {\n        url\n        errorMessage\n      }\n    }\n  }\n}\n\nfragment Feed on Feed {\n  id\n  type\n  title\n  url\n  updated\n  websiteUrl\n  description\n  generator\n  requirement\n  category\n  entries(first: 10) {\n    nodes {\n      ...EntryMeta\n    }\n  }\n  links {\n    nodes {\n      ...Link\n    }\n  }\n  authors {\n    nodes\n  }\n}\n\nfragment EntryMeta on Entry {\n    title\n    published\n    updated\n    summary\n}\n\nfragment Link on Link {\n  href\n  rel\n  mediaType\n  title  \n}\n\nquery Entries($after: String, $first: Int!) {\n  output: subscription {\n    entries(after: $after, first: $first) {\n      nodes {\n        ...Entry\n      }\n      pageInfo {\n        ...PageInfo\n      }\n    }\n  }\n}\n\nfragment Entry on Entry {\n  title\n  published\n  updated\n  summary\n  websiteUrl\n  feed {\n    ...FeedMeta\n  }\n}\n\nfragment FeedMeta on FeedMeta {\n  title\n  url\n  requirement\n  category\n}\n\nfragment PageInfo on PageInfo {\n  hasNextPage\n  endCursor\n}\n\nquery ExportSubscription($after: String, $first: Int!) {\n  output: subscription {\n    feeds(after: $after, first: $first) {\n      pageInfo {\n        hasNextPage\n        endCursor\n      }\n      nodes {\n        title\n        url\n        description\n        requirement\n        category\n      }\n    }\n  }\n}\n" ;
290    use super::*;
291    use serde::{Deserialize, Serialize};
292    #[allow(dead_code)]
293    type Boolean = bool;
294    #[allow(dead_code)]
295    type Float = f64;
296    #[allow(dead_code)]
297    type Int = i64;
298    #[allow(dead_code)]
299    type ID = String;
300    type Category = crate::client::synd_api::scalar::Category;
301    type FeedUrl = crate::client::synd_api::scalar::FeedUrl;
302    #[derive(Clone, Debug, Eq, PartialEq)]
303    pub enum Requirement {
304        MUST,
305        SHOULD,
306        MAY,
307        Other(String),
308    }
309    impl ::serde::Serialize for Requirement {
310        fn serialize<S: serde::Serializer>(&self, ser: S) -> Result<S::Ok, S::Error> {
311            ser.serialize_str(match *self {
312                Requirement::MUST => "MUST",
313                Requirement::SHOULD => "SHOULD",
314                Requirement::MAY => "MAY",
315                Requirement::Other(ref s) => &s,
316            })
317        }
318    }
319    impl<'de> ::serde::Deserialize<'de> for Requirement {
320        fn deserialize<D: ::serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
321            let s: String = ::serde::Deserialize::deserialize(deserializer)?;
322            match s.as_str() {
323                "MUST" => Ok(Requirement::MUST),
324                "SHOULD" => Ok(Requirement::SHOULD),
325                "MAY" => Ok(Requirement::MAY),
326                _ => Ok(Requirement::Other(s)),
327            }
328        }
329    }
330    #[derive(Serialize, Debug, Clone, PartialEq, Eq)]
331    pub struct Variables {
332        pub after: Option<String>,
333        pub first: Int,
334    }
335    impl Variables {}
336    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
337    pub struct ResponseData {
338        pub output: ExportSubscriptionOutput,
339    }
340    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
341    pub struct ExportSubscriptionOutput {
342        pub feeds: ExportSubscriptionOutputFeeds,
343    }
344    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
345    pub struct ExportSubscriptionOutputFeeds {
346        #[serde(rename = "pageInfo")]
347        pub page_info: ExportSubscriptionOutputFeedsPageInfo,
348        pub nodes: Vec<ExportSubscriptionOutputFeedsNodes>,
349    }
350    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
351    pub struct ExportSubscriptionOutputFeedsPageInfo {
352        #[serde(rename = "hasNextPage")]
353        pub has_next_page: Boolean,
354        #[serde(rename = "endCursor")]
355        pub end_cursor: Option<String>,
356    }
357    #[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
358    pub struct ExportSubscriptionOutputFeedsNodes {
359        pub title: Option<String>,
360        pub url: FeedUrl,
361        pub description: Option<String>,
362        pub requirement: Option<Requirement>,
363        pub category: Option<Category>,
364    }
365}
366impl graphql_client::GraphQLQuery for ExportSubscription {
367    type Variables = export_subscription::Variables;
368    type ResponseData = export_subscription::ResponseData;
369    fn build_query(variables: Self::Variables) -> ::graphql_client::QueryBody<Self::Variables> {
370        graphql_client::QueryBody {
371            variables,
372            query: export_subscription::QUERY,
373            operation_name: export_subscription::OPERATION_NAME,
374        }
375    }
376}