Skip to main content

slack_web_api/api/
slack_lists.rs

1// このファイルは codegen/generate.py が生成する。手で編集しない
2
3#![allow(unused_imports)]
4
5use crate::objects::*;
6use crate::{
7    CursorPaginated, NextCursor, ResponseMetadata, SlackApiMethod, SlackClient, SlackError,
8};
9use serde::{Deserialize, Serialize};
10
11/// Arguments for the Slack Web API method [`slackLists.access.delete`](https://docs.slack.dev/reference/methods/slackLists.access.delete): Revoke access to a List for specified entities.
12///
13/// Send it with [`SlackClient::slack_lists_access_delete`].
14#[doc(alias = "slackLists.access.delete")]
15#[derive(Debug, Clone, PartialEq, Serialize)]
16#[non_exhaustive]
17pub struct SlackListsAccessDeleteRequest {
18    /// Encoded ID of the List.
19    pub list_id: String,
20    /// List of channels you wish to update access for. Can only be used if `user_ids` is not provided.
21    #[serde(
22        skip_serializing_if = "Option::is_none",
23        serialize_with = "crate::form::as_json"
24    )]
25    pub channel_ids: Option<Vec<String>>,
26    /// List of users you wish to update access for. Can only be used if `channel_ids` is not provided.
27    #[serde(
28        skip_serializing_if = "Option::is_none",
29        serialize_with = "crate::form::as_json"
30    )]
31    pub user_ids: Option<Vec<String>>,
32}
33
34impl SlackListsAccessDeleteRequest {
35    pub fn new(list_id: impl Into<String>) -> Self {
36        Self {
37            list_id: list_id.into(),
38            channel_ids: None,
39            user_ids: None,
40        }
41    }
42
43    pub fn channel_ids(mut self, channel_ids: Vec<String>) -> Self {
44        self.channel_ids = Some(channel_ids);
45        self
46    }
47
48    pub fn user_ids(mut self, user_ids: Vec<String>) -> Self {
49        self.user_ids = Some(user_ids);
50        self
51    }
52}
53
54impl SlackApiMethod for SlackListsAccessDeleteRequest {
55    const METHOD: &'static str = "slackLists.access.delete";
56    type Response = SlackListsAccessDeleteResponse;
57}
58
59/// Successful response of the Slack Web API method [`slackLists.access.delete`](https://docs.slack.dev/reference/methods/slackLists.access.delete).
60#[doc(alias = "slackLists.access.delete")]
61#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
62pub struct SlackListsAccessDeleteResponse {
63    /// Fields returned by Slack. This method has no documented response example.
64    #[serde(flatten)]
65    pub extra: serde_json::Map<String, serde_json::Value>,
66    #[serde(
67        default,
68        deserialize_with = "crate::de::opt_object",
69        skip_serializing_if = "Option::is_none"
70    )]
71    pub response_metadata: Option<ResponseMetadata>,
72    #[serde(
73        default,
74        deserialize_with = "crate::de::opt_string",
75        skip_serializing_if = "Option::is_none"
76    )]
77    pub warning: Option<String>,
78}
79
80/// Arguments for the Slack Web API method [`slackLists.access.set`](https://docs.slack.dev/reference/methods/slackLists.access.set): Set the access level to a List for specified entities.
81///
82/// Send it with [`SlackClient::slack_lists_access_set`].
83#[doc(alias = "slackLists.access.set")]
84#[derive(Debug, Clone, PartialEq, Serialize)]
85#[non_exhaustive]
86pub struct SlackListsAccessSetRequest {
87    /// Encoded ID of the List.
88    pub list_id: String,
89    /// Desired level of access.
90    pub access_level: String,
91    /// List of channels you wish to update access for. Can only be used if `user_ids` is not provided.
92    #[serde(
93        skip_serializing_if = "Option::is_none",
94        serialize_with = "crate::form::as_json"
95    )]
96    pub channel_ids: Option<Vec<String>>,
97    /// List of users you wish to update access for. Can only be used if `channel_ids` is not provided.
98    #[serde(
99        skip_serializing_if = "Option::is_none",
100        serialize_with = "crate::form::as_json"
101    )]
102    pub user_ids: Option<Vec<String>>,
103}
104
105impl SlackListsAccessSetRequest {
106    pub fn new(list_id: impl Into<String>, access_level: impl Into<String>) -> Self {
107        Self {
108            list_id: list_id.into(),
109            access_level: access_level.into(),
110            channel_ids: None,
111            user_ids: None,
112        }
113    }
114
115    pub fn channel_ids(mut self, channel_ids: Vec<String>) -> Self {
116        self.channel_ids = Some(channel_ids);
117        self
118    }
119
120    pub fn user_ids(mut self, user_ids: Vec<String>) -> Self {
121        self.user_ids = Some(user_ids);
122        self
123    }
124}
125
126impl SlackApiMethod for SlackListsAccessSetRequest {
127    const METHOD: &'static str = "slackLists.access.set";
128    type Response = SlackListsAccessSetResponse;
129}
130
131/// Successful response of the Slack Web API method [`slackLists.access.set`](https://docs.slack.dev/reference/methods/slackLists.access.set).
132#[doc(alias = "slackLists.access.set")]
133#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
134pub struct SlackListsAccessSetResponse {
135    /// Fields returned by Slack. This method has no documented response example.
136    #[serde(flatten)]
137    pub extra: serde_json::Map<String, serde_json::Value>,
138    #[serde(
139        default,
140        deserialize_with = "crate::de::opt_object",
141        skip_serializing_if = "Option::is_none"
142    )]
143    pub response_metadata: Option<ResponseMetadata>,
144    #[serde(
145        default,
146        deserialize_with = "crate::de::opt_string",
147        skip_serializing_if = "Option::is_none"
148    )]
149    pub warning: Option<String>,
150}
151
152/// Arguments for the Slack Web API method [`slackLists.create`](https://docs.slack.dev/reference/methods/slackLists.create): Create a List.
153///
154/// Send it with [`SlackClient::slack_lists_create`].
155#[doc(alias = "slackLists.create")]
156#[derive(Debug, Clone, PartialEq, Serialize)]
157#[non_exhaustive]
158pub struct SlackListsCreateRequest {
159    /// Name of the List.
160    pub name: String,
161    /// A rich text description of the List.
162    #[serde(
163        skip_serializing_if = "Option::is_none",
164        serialize_with = "crate::form::as_json"
165    )]
166    pub description_blocks: Option<Vec<crate::blocks::Block>>,
167    /// Column definition for the List.
168    #[serde(
169        skip_serializing_if = "Option::is_none",
170        serialize_with = "crate::form::as_json"
171    )]
172    pub schema: Option<Vec<serde_json::Value>>,
173    /// ID of the List to copy.
174    #[serde(skip_serializing_if = "Option::is_none")]
175    pub copy_from_list_id: Option<String>,
176    /// Boolean indicating whether to include records when a List is copied.
177    #[serde(skip_serializing_if = "Option::is_none")]
178    pub include_copied_list_records: Option<bool>,
179    /// Boolean indicating whether the List should be used to track todo tasks.
180    #[serde(skip_serializing_if = "Option::is_none")]
181    pub todo_mode: Option<bool>,
182}
183
184impl SlackListsCreateRequest {
185    pub fn new(name: impl Into<String>) -> Self {
186        Self {
187            name: name.into(),
188            description_blocks: None,
189            schema: None,
190            copy_from_list_id: None,
191            include_copied_list_records: None,
192            todo_mode: None,
193        }
194    }
195
196    pub fn description_blocks(mut self, description_blocks: Vec<crate::blocks::Block>) -> Self {
197        self.description_blocks = Some(description_blocks);
198        self
199    }
200
201    pub fn schema(mut self, schema: Vec<serde_json::Value>) -> Self {
202        self.schema = Some(schema);
203        self
204    }
205
206    pub fn copy_from_list_id(mut self, copy_from_list_id: impl Into<String>) -> Self {
207        self.copy_from_list_id = Some(copy_from_list_id.into());
208        self
209    }
210
211    pub fn include_copied_list_records(mut self, include_copied_list_records: bool) -> Self {
212        self.include_copied_list_records = Some(include_copied_list_records);
213        self
214    }
215
216    pub fn todo_mode(mut self, todo_mode: bool) -> Self {
217        self.todo_mode = Some(todo_mode);
218        self
219    }
220}
221
222impl SlackApiMethod for SlackListsCreateRequest {
223    const METHOD: &'static str = "slackLists.create";
224    type Response = SlackListsCreateResponse;
225}
226
227/// Successful response of the Slack Web API method [`slackLists.create`](https://docs.slack.dev/reference/methods/slackLists.create).
228#[doc(alias = "slackLists.create")]
229#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
230pub struct SlackListsCreateResponse {
231    #[serde(
232        default,
233        deserialize_with = "crate::de::opt_string",
234        skip_serializing_if = "Option::is_none"
235    )]
236    pub list_id: Option<String>,
237    #[serde(
238        default,
239        deserialize_with = "crate::de::opt_object",
240        skip_serializing_if = "Option::is_none"
241    )]
242    pub list_metadata: Option<SlackListsCreateResponseListMetadata>,
243    #[serde(
244        default,
245        deserialize_with = "crate::de::opt_object",
246        skip_serializing_if = "Option::is_none"
247    )]
248    pub response_metadata: Option<ResponseMetadata>,
249    #[serde(
250        default,
251        deserialize_with = "crate::de::opt_string",
252        skip_serializing_if = "Option::is_none"
253    )]
254    pub warning: Option<String>,
255}
256
257#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
258pub struct SlackListsCreateResponseListMetadata {
259    #[serde(
260        default,
261        deserialize_with = "crate::de::vec",
262        skip_serializing_if = "Vec::is_empty"
263    )]
264    pub schema: Vec<SlackListsCreateResponseListMetadataSchema>,
265    #[serde(
266        default,
267        deserialize_with = "crate::de::vec",
268        skip_serializing_if = "Vec::is_empty"
269    )]
270    pub subtask_schema: Vec<SlackListsCreateResponseListMetadataSubtaskSchema>,
271}
272
273#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
274pub struct SlackListsCreateResponseListMetadataSchema {
275    #[serde(
276        default,
277        deserialize_with = "crate::de::opt_string",
278        skip_serializing_if = "Option::is_none"
279    )]
280    pub key: Option<String>,
281    #[serde(
282        default,
283        deserialize_with = "crate::de::opt_string",
284        skip_serializing_if = "Option::is_none"
285    )]
286    pub name: Option<String>,
287    #[serde(
288        default,
289        deserialize_with = "crate::de::opt_bool",
290        skip_serializing_if = "Option::is_none"
291    )]
292    pub is_primary_column: Option<bool>,
293    #[serde(
294        default,
295        deserialize_with = "crate::de::opt_string",
296        skip_serializing_if = "Option::is_none"
297    )]
298    pub r#type: Option<String>,
299    #[serde(
300        default,
301        deserialize_with = "crate::de::opt_string",
302        skip_serializing_if = "Option::is_none"
303    )]
304    pub id: Option<String>,
305    #[serde(
306        default,
307        deserialize_with = "crate::de::opt_object",
308        skip_serializing_if = "Option::is_none"
309    )]
310    pub options: Option<SlackListsCreateResponseListMetadataSchemaOptions>,
311}
312
313#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
314pub struct SlackListsCreateResponseListMetadataSchemaOptions {
315    #[serde(
316        default,
317        deserialize_with = "crate::de::opt_i64",
318        skip_serializing_if = "Option::is_none"
319    )]
320    pub precision: Option<i64>,
321    #[serde(
322        default,
323        deserialize_with = "crate::de::opt_bool",
324        skip_serializing_if = "Option::is_none"
325    )]
326    pub show_member_name: Option<bool>,
327    #[serde(
328        default,
329        deserialize_with = "crate::de::vec",
330        skip_serializing_if = "Vec::is_empty"
331    )]
332    pub choices: Vec<SlackListsCreateResponseListMetadataSchemaOptionsChoices>,
333    #[serde(
334        default,
335        deserialize_with = "crate::de::opt_string",
336        skip_serializing_if = "Option::is_none"
337    )]
338    pub format: Option<String>,
339    #[serde(
340        default,
341        deserialize_with = "crate::de::opt_string",
342        skip_serializing_if = "Option::is_none"
343    )]
344    pub emoji: Option<String>,
345    #[serde(
346        default,
347        deserialize_with = "crate::de::opt_i64",
348        skip_serializing_if = "Option::is_none"
349    )]
350    pub max: Option<i64>,
351    #[serde(default, skip_serializing_if = "Option::is_none")]
352    pub default_value: Option<serde_json::Value>,
353}
354
355#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
356pub struct SlackListsCreateResponseListMetadataSchemaOptionsChoices {
357    #[serde(
358        default,
359        deserialize_with = "crate::de::opt_string",
360        skip_serializing_if = "Option::is_none"
361    )]
362    pub value: Option<String>,
363    #[serde(
364        default,
365        deserialize_with = "crate::de::opt_string",
366        skip_serializing_if = "Option::is_none"
367    )]
368    pub label: Option<String>,
369    #[serde(
370        default,
371        deserialize_with = "crate::de::opt_string",
372        skip_serializing_if = "Option::is_none"
373    )]
374    pub color: Option<String>,
375}
376
377#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
378pub struct SlackListsCreateResponseListMetadataSubtaskSchema {
379    #[serde(
380        default,
381        deserialize_with = "crate::de::opt_string",
382        skip_serializing_if = "Option::is_none"
383    )]
384    pub key: Option<String>,
385    #[serde(
386        default,
387        deserialize_with = "crate::de::opt_string",
388        skip_serializing_if = "Option::is_none"
389    )]
390    pub name: Option<String>,
391    #[serde(
392        default,
393        deserialize_with = "crate::de::opt_bool",
394        skip_serializing_if = "Option::is_none"
395    )]
396    pub is_primary_column: Option<bool>,
397    #[serde(
398        default,
399        deserialize_with = "crate::de::opt_string",
400        skip_serializing_if = "Option::is_none"
401    )]
402    pub r#type: Option<String>,
403    #[serde(
404        default,
405        deserialize_with = "crate::de::opt_string",
406        skip_serializing_if = "Option::is_none"
407    )]
408    pub id: Option<String>,
409    #[serde(
410        default,
411        deserialize_with = "crate::de::opt_object",
412        skip_serializing_if = "Option::is_none"
413    )]
414    pub options: Option<SlackListsCreateResponseListMetadataSubtaskSchemaOptions>,
415}
416
417#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
418pub struct SlackListsCreateResponseListMetadataSubtaskSchemaOptions {
419    #[serde(
420        default,
421        deserialize_with = "crate::de::opt_string",
422        skip_serializing_if = "Option::is_none"
423    )]
424    pub format: Option<String>,
425    #[serde(default, skip_serializing_if = "Option::is_none")]
426    pub default_value: Option<serde_json::Value>,
427    #[serde(
428        default,
429        deserialize_with = "crate::de::opt_bool",
430        skip_serializing_if = "Option::is_none"
431    )]
432    pub show_member_name: Option<bool>,
433}
434
435/// Arguments for the Slack Web API method [`slackLists.download.get`](https://docs.slack.dev/reference/methods/slackLists.download.get): Retrieve List download URL from an export job to download List contents.
436///
437/// Send it with [`SlackClient::slack_lists_download_get`].
438#[doc(alias = "slackLists.download.get")]
439#[derive(Debug, Clone, PartialEq, Serialize)]
440#[non_exhaustive]
441pub struct SlackListsDownloadGetRequest {
442    /// ID of the List to export.
443    pub list_id: String,
444    /// The ID of the recently started job to export the List.
445    pub job_id: String,
446    /// Format the export was started with. Must match the `format` passed to `slackLists.download.start`. Defaults to `csv`.
447    #[serde(skip_serializing_if = "Option::is_none")]
448    pub format: Option<String>,
449    /// Must match the `include_threads` passed to `slackLists.download.start`. The returned `download_url` carries this through so the served export matches what was generated. Only applies when `format` is `json`.
450    #[serde(skip_serializing_if = "Option::is_none")]
451    pub include_threads: Option<bool>,
452    /// Must match the `include_attachments` passed to `slackLists.download.start`. The returned `download_url` carries this through so the served export matches what was generated. Only applies when `format` is `json`.
453    #[serde(skip_serializing_if = "Option::is_none")]
454    pub include_attachments: Option<bool>,
455}
456
457impl SlackListsDownloadGetRequest {
458    pub fn new(list_id: impl Into<String>, job_id: impl Into<String>) -> Self {
459        Self {
460            list_id: list_id.into(),
461            job_id: job_id.into(),
462            format: None,
463            include_threads: None,
464            include_attachments: None,
465        }
466    }
467
468    pub fn format(mut self, format: impl Into<String>) -> Self {
469        self.format = Some(format.into());
470        self
471    }
472
473    pub fn include_threads(mut self, include_threads: bool) -> Self {
474        self.include_threads = Some(include_threads);
475        self
476    }
477
478    pub fn include_attachments(mut self, include_attachments: bool) -> Self {
479        self.include_attachments = Some(include_attachments);
480        self
481    }
482}
483
484impl SlackApiMethod for SlackListsDownloadGetRequest {
485    const METHOD: &'static str = "slackLists.download.get";
486    type Response = SlackListsDownloadGetResponse;
487}
488
489/// Successful response of the Slack Web API method [`slackLists.download.get`](https://docs.slack.dev/reference/methods/slackLists.download.get).
490#[doc(alias = "slackLists.download.get")]
491#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
492pub struct SlackListsDownloadGetResponse {
493    #[serde(
494        default,
495        deserialize_with = "crate::de::opt_string",
496        skip_serializing_if = "Option::is_none"
497    )]
498    pub status: Option<String>,
499    #[serde(
500        default,
501        deserialize_with = "crate::de::opt_string",
502        skip_serializing_if = "Option::is_none"
503    )]
504    pub download_url: Option<String>,
505    #[serde(
506        default,
507        deserialize_with = "crate::de::opt_object",
508        skip_serializing_if = "Option::is_none"
509    )]
510    pub response_metadata: Option<ResponseMetadata>,
511    #[serde(
512        default,
513        deserialize_with = "crate::de::opt_string",
514        skip_serializing_if = "Option::is_none"
515    )]
516    pub warning: Option<String>,
517}
518
519/// Arguments for the Slack Web API method [`slackLists.download.start`](https://docs.slack.dev/reference/methods/slackLists.download.start): Initiate a job to export List contents.
520///
521/// Send it with [`SlackClient::slack_lists_download_start`].
522#[doc(alias = "slackLists.download.start")]
523#[derive(Debug, Clone, PartialEq, Serialize)]
524#[non_exhaustive]
525pub struct SlackListsDownloadStartRequest {
526    /// ID of the List to export.
527    pub list_id: String,
528    #[serde(skip_serializing_if = "Option::is_none")]
529    pub include_archived: Option<bool>,
530    /// Format of the export. Defaults to `csv` for backward compatibility. Use `json` for a complete, hierarchical export.
531    #[serde(skip_serializing_if = "Option::is_none")]
532    pub format: Option<String>,
533    /// Include each item's conversation thread in the export. Only applies when `format` is `json`.
534    #[serde(skip_serializing_if = "Option::is_none")]
535    pub include_threads: Option<bool>,
536    /// Include file attachment metadata and access paths in the export. Only applies when `format` is `json`.
537    #[serde(skip_serializing_if = "Option::is_none")]
538    pub include_attachments: Option<bool>,
539}
540
541impl SlackListsDownloadStartRequest {
542    pub fn new(list_id: impl Into<String>) -> Self {
543        Self {
544            list_id: list_id.into(),
545            include_archived: None,
546            format: None,
547            include_threads: None,
548            include_attachments: None,
549        }
550    }
551
552    pub fn include_archived(mut self, include_archived: bool) -> Self {
553        self.include_archived = Some(include_archived);
554        self
555    }
556
557    pub fn format(mut self, format: impl Into<String>) -> Self {
558        self.format = Some(format.into());
559        self
560    }
561
562    pub fn include_threads(mut self, include_threads: bool) -> Self {
563        self.include_threads = Some(include_threads);
564        self
565    }
566
567    pub fn include_attachments(mut self, include_attachments: bool) -> Self {
568        self.include_attachments = Some(include_attachments);
569        self
570    }
571}
572
573impl SlackApiMethod for SlackListsDownloadStartRequest {
574    const METHOD: &'static str = "slackLists.download.start";
575    type Response = SlackListsDownloadStartResponse;
576}
577
578/// Successful response of the Slack Web API method [`slackLists.download.start`](https://docs.slack.dev/reference/methods/slackLists.download.start).
579#[doc(alias = "slackLists.download.start")]
580#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
581pub struct SlackListsDownloadStartResponse {
582    #[serde(
583        default,
584        deserialize_with = "crate::de::opt_string",
585        skip_serializing_if = "Option::is_none"
586    )]
587    pub job_id: Option<String>,
588    #[serde(
589        default,
590        deserialize_with = "crate::de::opt_object",
591        skip_serializing_if = "Option::is_none"
592    )]
593    pub response_metadata: Option<ResponseMetadata>,
594    #[serde(
595        default,
596        deserialize_with = "crate::de::opt_string",
597        skip_serializing_if = "Option::is_none"
598    )]
599    pub warning: Option<String>,
600}
601
602/// Arguments for the Slack Web API method [`slackLists.items.create`](https://docs.slack.dev/reference/methods/slackLists.items.create): Add a new item to an existing List.
603///
604/// Send it with [`SlackClient::slack_lists_items_create`].
605#[doc(alias = "slackLists.items.create")]
606#[derive(Debug, Clone, PartialEq, Serialize)]
607#[non_exhaustive]
608pub struct SlackListsItemsCreateRequest {
609    /// ID of the List to add the item to.
610    pub list_id: String,
611    /// ID of the record to make a copy of.
612    #[serde(skip_serializing_if = "Option::is_none")]
613    pub duplicated_item_id: Option<String>,
614    /// ID of the parent record for this subtask.
615    #[serde(skip_serializing_if = "Option::is_none")]
616    pub parent_item_id: Option<String>,
617    /// Initial item data.
618    #[serde(
619        skip_serializing_if = "Option::is_none",
620        serialize_with = "crate::form::as_json"
621    )]
622    pub initial_fields: Option<Vec<serde_json::Value>>,
623}
624
625impl SlackListsItemsCreateRequest {
626    pub fn new(list_id: impl Into<String>) -> Self {
627        Self {
628            list_id: list_id.into(),
629            duplicated_item_id: None,
630            parent_item_id: None,
631            initial_fields: None,
632        }
633    }
634
635    pub fn duplicated_item_id(mut self, duplicated_item_id: impl Into<String>) -> Self {
636        self.duplicated_item_id = Some(duplicated_item_id.into());
637        self
638    }
639
640    pub fn parent_item_id(mut self, parent_item_id: impl Into<String>) -> Self {
641        self.parent_item_id = Some(parent_item_id.into());
642        self
643    }
644
645    pub fn initial_fields(mut self, initial_fields: Vec<serde_json::Value>) -> Self {
646        self.initial_fields = Some(initial_fields);
647        self
648    }
649}
650
651impl SlackApiMethod for SlackListsItemsCreateRequest {
652    const METHOD: &'static str = "slackLists.items.create";
653    type Response = SlackListsItemsCreateResponse;
654}
655
656/// Successful response of the Slack Web API method [`slackLists.items.create`](https://docs.slack.dev/reference/methods/slackLists.items.create).
657#[doc(alias = "slackLists.items.create")]
658#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
659pub struct SlackListsItemsCreateResponse {
660    #[serde(
661        default,
662        deserialize_with = "crate::de::opt_object",
663        skip_serializing_if = "Option::is_none"
664    )]
665    pub item: Option<SlackListsItemsCreateResponseItem>,
666    #[serde(
667        default,
668        deserialize_with = "crate::de::opt_object",
669        skip_serializing_if = "Option::is_none"
670    )]
671    pub response_metadata: Option<ResponseMetadata>,
672    #[serde(
673        default,
674        deserialize_with = "crate::de::opt_string",
675        skip_serializing_if = "Option::is_none"
676    )]
677    pub warning: Option<String>,
678}
679
680#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
681pub struct SlackListsItemsCreateResponseItem {
682    #[serde(
683        default,
684        deserialize_with = "crate::de::opt_string",
685        skip_serializing_if = "Option::is_none"
686    )]
687    pub id: Option<String>,
688    #[serde(
689        default,
690        deserialize_with = "crate::de::opt_string",
691        skip_serializing_if = "Option::is_none"
692    )]
693    pub list_id: Option<String>,
694    #[serde(
695        default,
696        deserialize_with = "crate::de::opt_i64",
697        skip_serializing_if = "Option::is_none"
698    )]
699    pub date_created: Option<i64>,
700    #[serde(
701        default,
702        deserialize_with = "crate::de::opt_string",
703        skip_serializing_if = "Option::is_none"
704    )]
705    pub created_by: Option<String>,
706    #[serde(
707        default,
708        deserialize_with = "crate::de::opt_string",
709        skip_serializing_if = "Option::is_none"
710    )]
711    pub updated_by: Option<String>,
712    #[serde(
713        default,
714        deserialize_with = "crate::de::vec",
715        skip_serializing_if = "Vec::is_empty"
716    )]
717    pub fields: Vec<SlackListsItemsCreateResponseItemFields>,
718    #[serde(
719        default,
720        deserialize_with = "crate::de::opt_string",
721        skip_serializing_if = "Option::is_none"
722    )]
723    pub updated_timestamp: Option<String>,
724}
725
726#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
727pub struct SlackListsItemsCreateResponseItemFields {
728    #[serde(
729        default,
730        deserialize_with = "crate::de::opt_string",
731        skip_serializing_if = "Option::is_none"
732    )]
733    pub key: Option<String>,
734    #[serde(
735        default,
736        deserialize_with = "crate::de::opt_string",
737        skip_serializing_if = "Option::is_none"
738    )]
739    pub value: Option<String>,
740    #[serde(
741        default,
742        deserialize_with = "crate::de::opt_string",
743        skip_serializing_if = "Option::is_none"
744    )]
745    pub text: Option<String>,
746    #[serde(
747        default,
748        deserialize_with = "crate::de::vec",
749        skip_serializing_if = "Vec::is_empty"
750    )]
751    pub rich_text: Vec<SlackListsItemsCreateResponseItemFieldsRichText>,
752    #[serde(
753        default,
754        deserialize_with = "crate::de::opt_string",
755        skip_serializing_if = "Option::is_none"
756    )]
757    pub column_id: Option<String>,
758    #[serde(
759        default,
760        deserialize_with = "crate::de::vec",
761        skip_serializing_if = "Vec::is_empty"
762    )]
763    pub select: Vec<String>,
764    #[serde(
765        default,
766        deserialize_with = "crate::de::vec",
767        skip_serializing_if = "Vec::is_empty"
768    )]
769    pub date: Vec<String>,
770    #[serde(
771        default,
772        deserialize_with = "crate::de::vec",
773        skip_serializing_if = "Vec::is_empty"
774    )]
775    pub timestamp: Vec<i64>,
776    #[serde(
777        default,
778        deserialize_with = "crate::de::vec",
779        skip_serializing_if = "Vec::is_empty"
780    )]
781    pub user: Vec<String>,
782}
783
784#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
785pub struct SlackListsItemsCreateResponseItemFieldsRichText {
786    #[serde(
787        default,
788        deserialize_with = "crate::de::opt_string",
789        skip_serializing_if = "Option::is_none"
790    )]
791    pub r#type: Option<String>,
792    #[serde(
793        default,
794        deserialize_with = "crate::de::opt_string",
795        skip_serializing_if = "Option::is_none"
796    )]
797    pub block_id: Option<String>,
798    #[serde(
799        default,
800        deserialize_with = "crate::de::vec",
801        skip_serializing_if = "Vec::is_empty"
802    )]
803    pub elements: Vec<SlackListsItemsCreateResponseItemFieldsRichTextElements>,
804}
805
806#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
807pub struct SlackListsItemsCreateResponseItemFieldsRichTextElements {
808    #[serde(
809        default,
810        deserialize_with = "crate::de::opt_string",
811        skip_serializing_if = "Option::is_none"
812    )]
813    pub r#type: Option<String>,
814    #[serde(
815        default,
816        deserialize_with = "crate::de::vec",
817        skip_serializing_if = "Vec::is_empty"
818    )]
819    pub elements: Vec<SlackListsItemsCreateResponseItemFieldsRichTextElementsElements>,
820}
821
822#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
823pub struct SlackListsItemsCreateResponseItemFieldsRichTextElementsElements {
824    #[serde(
825        default,
826        deserialize_with = "crate::de::opt_string",
827        skip_serializing_if = "Option::is_none"
828    )]
829    pub text: Option<String>,
830    #[serde(
831        default,
832        deserialize_with = "crate::de::opt_string",
833        skip_serializing_if = "Option::is_none"
834    )]
835    pub r#type: Option<String>,
836}
837
838/// Arguments for the Slack Web API method [`slackLists.items.delete`](https://docs.slack.dev/reference/methods/slackLists.items.delete): Deletes an item from an existing List.
839///
840/// Send it with [`SlackClient::slack_lists_items_delete`].
841#[doc(alias = "slackLists.items.delete")]
842#[derive(Debug, Clone, PartialEq, Serialize)]
843#[non_exhaustive]
844pub struct SlackListsItemsDeleteRequest {
845    /// ID of the List containing the item.
846    pub list_id: String,
847    /// ID of item to delete.
848    pub id: String,
849}
850
851impl SlackListsItemsDeleteRequest {
852    pub fn new(list_id: impl Into<String>, id: impl Into<String>) -> Self {
853        Self {
854            list_id: list_id.into(),
855            id: id.into(),
856        }
857    }
858}
859
860impl SlackApiMethod for SlackListsItemsDeleteRequest {
861    const METHOD: &'static str = "slackLists.items.delete";
862    type Response = SlackListsItemsDeleteResponse;
863}
864
865/// Successful response of the Slack Web API method [`slackLists.items.delete`](https://docs.slack.dev/reference/methods/slackLists.items.delete).
866#[doc(alias = "slackLists.items.delete")]
867#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
868pub struct SlackListsItemsDeleteResponse {
869    /// Fields returned by Slack. This method has no documented response example.
870    #[serde(flatten)]
871    pub extra: serde_json::Map<String, serde_json::Value>,
872    #[serde(
873        default,
874        deserialize_with = "crate::de::opt_object",
875        skip_serializing_if = "Option::is_none"
876    )]
877    pub response_metadata: Option<ResponseMetadata>,
878    #[serde(
879        default,
880        deserialize_with = "crate::de::opt_string",
881        skip_serializing_if = "Option::is_none"
882    )]
883    pub warning: Option<String>,
884}
885
886/// Arguments for the Slack Web API method [`slackLists.items.deleteMultiple`](https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple): Deletes multiple items from an existing List.
887///
888/// Send it with [`SlackClient::slack_lists_items_delete_multiple`].
889#[doc(alias = "slackLists.items.deleteMultiple")]
890#[derive(Debug, Clone, PartialEq, Serialize)]
891#[non_exhaustive]
892pub struct SlackListsItemsDeleteMultipleRequest {
893    /// ID of the List containing the items.
894    pub list_id: String,
895    /// IDs of items to delete.
896    pub ids: Vec<String>,
897}
898
899impl SlackListsItemsDeleteMultipleRequest {
900    pub fn new(list_id: impl Into<String>, ids: Vec<String>) -> Self {
901        Self {
902            list_id: list_id.into(),
903            ids,
904        }
905    }
906}
907
908impl SlackApiMethod for SlackListsItemsDeleteMultipleRequest {
909    const METHOD: &'static str = "slackLists.items.deleteMultiple";
910    type Response = SlackListsItemsDeleteMultipleResponse;
911}
912
913/// Successful response of the Slack Web API method [`slackLists.items.deleteMultiple`](https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple).
914#[doc(alias = "slackLists.items.deleteMultiple")]
915#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
916pub struct SlackListsItemsDeleteMultipleResponse {
917    /// Fields returned by Slack. This method has no documented response example.
918    #[serde(flatten)]
919    pub extra: serde_json::Map<String, serde_json::Value>,
920    #[serde(
921        default,
922        deserialize_with = "crate::de::opt_object",
923        skip_serializing_if = "Option::is_none"
924    )]
925    pub response_metadata: Option<ResponseMetadata>,
926    #[serde(
927        default,
928        deserialize_with = "crate::de::opt_string",
929        skip_serializing_if = "Option::is_none"
930    )]
931    pub warning: Option<String>,
932}
933
934/// Arguments for the Slack Web API method [`slackLists.items.info`](https://docs.slack.dev/reference/methods/slackLists.items.info): Get a row from a List.
935///
936/// Send it with [`SlackClient::slack_lists_items_info`].
937#[doc(alias = "slackLists.items.info")]
938#[derive(Debug, Clone, PartialEq, Serialize)]
939#[non_exhaustive]
940pub struct SlackListsItemsInfoRequest {
941    /// ID of the List.
942    pub list_id: String,
943    /// ID of the row to get.
944    pub id: String,
945    /// Set to `true` to include `is_subscribed` data for the returned List row.
946    #[serde(skip_serializing_if = "Option::is_none")]
947    pub include_is_subscribed: Option<bool>,
948}
949
950impl SlackListsItemsInfoRequest {
951    pub fn new(list_id: impl Into<String>, id: impl Into<String>) -> Self {
952        Self {
953            list_id: list_id.into(),
954            id: id.into(),
955            include_is_subscribed: None,
956        }
957    }
958
959    pub fn include_is_subscribed(mut self, include_is_subscribed: bool) -> Self {
960        self.include_is_subscribed = Some(include_is_subscribed);
961        self
962    }
963}
964
965impl SlackApiMethod for SlackListsItemsInfoRequest {
966    const METHOD: &'static str = "slackLists.items.info";
967    type Response = SlackListsItemsInfoResponse;
968}
969
970/// Successful response of the Slack Web API method [`slackLists.items.info`](https://docs.slack.dev/reference/methods/slackLists.items.info).
971#[doc(alias = "slackLists.items.info")]
972#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
973pub struct SlackListsItemsInfoResponse {
974    #[serde(
975        default,
976        deserialize_with = "crate::de::opt_object",
977        skip_serializing_if = "Option::is_none"
978    )]
979    pub list: Option<SlackListsItemsInfoResponseList>,
980    #[serde(
981        default,
982        deserialize_with = "crate::de::opt_object",
983        skip_serializing_if = "Option::is_none"
984    )]
985    pub record: Option<SlackListsItemsInfoResponseRecord>,
986    #[serde(
987        default,
988        deserialize_with = "crate::de::vec",
989        skip_serializing_if = "Vec::is_empty"
990    )]
991    pub subtasks: Vec<serde_json::Value>,
992    #[serde(
993        default,
994        deserialize_with = "crate::de::opt_object",
995        skip_serializing_if = "Option::is_none"
996    )]
997    pub response_metadata: Option<ResponseMetadata>,
998    #[serde(
999        default,
1000        deserialize_with = "crate::de::opt_string",
1001        skip_serializing_if = "Option::is_none"
1002    )]
1003    pub warning: Option<String>,
1004}
1005
1006#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1007pub struct SlackListsItemsInfoResponseList {
1008    #[serde(
1009        default,
1010        deserialize_with = "crate::de::opt_string",
1011        skip_serializing_if = "Option::is_none"
1012    )]
1013    pub id: Option<String>,
1014    #[serde(
1015        default,
1016        deserialize_with = "crate::de::opt_i64",
1017        skip_serializing_if = "Option::is_none"
1018    )]
1019    pub created: Option<i64>,
1020    #[serde(
1021        default,
1022        deserialize_with = "crate::de::opt_i64",
1023        skip_serializing_if = "Option::is_none"
1024    )]
1025    pub timestamp: Option<i64>,
1026    #[serde(
1027        default,
1028        deserialize_with = "crate::de::opt_string",
1029        skip_serializing_if = "Option::is_none"
1030    )]
1031    pub name: Option<String>,
1032    #[serde(
1033        default,
1034        deserialize_with = "crate::de::opt_string",
1035        skip_serializing_if = "Option::is_none"
1036    )]
1037    pub title: Option<String>,
1038    #[serde(
1039        default,
1040        deserialize_with = "crate::de::opt_string",
1041        skip_serializing_if = "Option::is_none"
1042    )]
1043    pub mimetype: Option<String>,
1044    #[serde(
1045        default,
1046        deserialize_with = "crate::de::opt_string",
1047        skip_serializing_if = "Option::is_none"
1048    )]
1049    pub filetype: Option<String>,
1050    #[serde(
1051        default,
1052        deserialize_with = "crate::de::opt_string",
1053        skip_serializing_if = "Option::is_none"
1054    )]
1055    pub pretty_type: Option<String>,
1056    #[serde(
1057        default,
1058        deserialize_with = "crate::de::opt_string",
1059        skip_serializing_if = "Option::is_none"
1060    )]
1061    pub user: Option<String>,
1062    #[serde(
1063        default,
1064        deserialize_with = "crate::de::opt_string",
1065        skip_serializing_if = "Option::is_none"
1066    )]
1067    pub user_team: Option<String>,
1068    #[serde(
1069        default,
1070        deserialize_with = "crate::de::opt_bool",
1071        skip_serializing_if = "Option::is_none"
1072    )]
1073    pub editable: Option<bool>,
1074    #[serde(
1075        default,
1076        deserialize_with = "crate::de::opt_i64",
1077        skip_serializing_if = "Option::is_none"
1078    )]
1079    pub size: Option<i64>,
1080    #[serde(
1081        default,
1082        deserialize_with = "crate::de::opt_string",
1083        skip_serializing_if = "Option::is_none"
1084    )]
1085    pub mode: Option<String>,
1086    #[serde(
1087        default,
1088        deserialize_with = "crate::de::opt_bool",
1089        skip_serializing_if = "Option::is_none"
1090    )]
1091    pub is_external: Option<bool>,
1092    #[serde(
1093        default,
1094        deserialize_with = "crate::de::opt_string",
1095        skip_serializing_if = "Option::is_none"
1096    )]
1097    pub external_type: Option<String>,
1098    #[serde(
1099        default,
1100        deserialize_with = "crate::de::opt_bool",
1101        skip_serializing_if = "Option::is_none"
1102    )]
1103    pub is_public: Option<bool>,
1104    #[serde(
1105        default,
1106        deserialize_with = "crate::de::opt_bool",
1107        skip_serializing_if = "Option::is_none"
1108    )]
1109    pub public_url_shared: Option<bool>,
1110    #[serde(
1111        default,
1112        deserialize_with = "crate::de::opt_bool",
1113        skip_serializing_if = "Option::is_none"
1114    )]
1115    pub display_as_bot: Option<bool>,
1116    #[serde(
1117        default,
1118        deserialize_with = "crate::de::opt_string",
1119        skip_serializing_if = "Option::is_none"
1120    )]
1121    pub username: Option<String>,
1122    #[serde(
1123        default,
1124        deserialize_with = "crate::de::opt_object",
1125        skip_serializing_if = "Option::is_none"
1126    )]
1127    pub list_metadata: Option<SlackListsItemsInfoResponseListListMetadata>,
1128    #[serde(
1129        default,
1130        deserialize_with = "crate::de::opt_object",
1131        skip_serializing_if = "Option::is_none"
1132    )]
1133    pub list_limits: Option<SlackListsItemsInfoResponseListListLimits>,
1134    #[serde(
1135        default,
1136        deserialize_with = "crate::de::opt_string",
1137        skip_serializing_if = "Option::is_none"
1138    )]
1139    pub url_private: Option<String>,
1140    #[serde(
1141        default,
1142        deserialize_with = "crate::de::opt_string",
1143        skip_serializing_if = "Option::is_none"
1144    )]
1145    pub url_private_download: Option<String>,
1146    #[serde(
1147        default,
1148        deserialize_with = "crate::de::opt_string",
1149        skip_serializing_if = "Option::is_none"
1150    )]
1151    pub permalink: Option<String>,
1152    #[serde(
1153        default,
1154        deserialize_with = "crate::de::opt_string",
1155        skip_serializing_if = "Option::is_none"
1156    )]
1157    pub permalink_public: Option<String>,
1158    #[serde(
1159        default,
1160        deserialize_with = "crate::de::opt_string",
1161        skip_serializing_if = "Option::is_none"
1162    )]
1163    pub last_editor: Option<String>,
1164    #[serde(
1165        default,
1166        deserialize_with = "crate::de::opt_string",
1167        skip_serializing_if = "Option::is_none"
1168    )]
1169    pub list_csv_download_url: Option<String>,
1170    #[serde(
1171        default,
1172        deserialize_with = "crate::de::opt_i64",
1173        skip_serializing_if = "Option::is_none"
1174    )]
1175    pub updated: Option<i64>,
1176    #[serde(
1177        default,
1178        deserialize_with = "crate::de::opt_bool",
1179        skip_serializing_if = "Option::is_none"
1180    )]
1181    pub is_starred: Option<bool>,
1182    #[serde(
1183        default,
1184        deserialize_with = "crate::de::opt_bool",
1185        skip_serializing_if = "Option::is_none"
1186    )]
1187    pub skipped_shares: Option<bool>,
1188    #[serde(
1189        default,
1190        deserialize_with = "crate::de::vec",
1191        skip_serializing_if = "Vec::is_empty"
1192    )]
1193    pub teams_shared_with: Vec<String>,
1194    #[serde(
1195        default,
1196        deserialize_with = "crate::de::opt_bool",
1197        skip_serializing_if = "Option::is_none"
1198    )]
1199    pub is_restricted_sharing_enabled: Option<bool>,
1200    #[serde(
1201        default,
1202        deserialize_with = "crate::de::opt_bool",
1203        skip_serializing_if = "Option::is_none"
1204    )]
1205    pub has_rich_preview: Option<bool>,
1206    #[serde(
1207        default,
1208        deserialize_with = "crate::de::opt_string",
1209        skip_serializing_if = "Option::is_none"
1210    )]
1211    pub file_access: Option<String>,
1212    #[serde(
1213        default,
1214        deserialize_with = "crate::de::opt_string",
1215        skip_serializing_if = "Option::is_none"
1216    )]
1217    pub access: Option<String>,
1218    #[serde(
1219        default,
1220        deserialize_with = "crate::de::opt_string",
1221        skip_serializing_if = "Option::is_none"
1222    )]
1223    pub org_or_workspace_access: Option<String>,
1224    #[serde(
1225        default,
1226        deserialize_with = "crate::de::opt_bool",
1227        skip_serializing_if = "Option::is_none"
1228    )]
1229    pub is_ai_suggested: Option<bool>,
1230}
1231
1232#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1233pub struct SlackListsItemsInfoResponseListListMetadata {
1234    #[serde(
1235        default,
1236        deserialize_with = "crate::de::vec",
1237        skip_serializing_if = "Vec::is_empty"
1238    )]
1239    pub schema: Vec<SlackListsItemsInfoResponseListListMetadataSchema>,
1240    #[serde(
1241        default,
1242        deserialize_with = "crate::de::vec",
1243        skip_serializing_if = "Vec::is_empty"
1244    )]
1245    pub views: Vec<SlackListsItemsInfoResponseListListMetadataViews>,
1246    #[serde(
1247        default,
1248        deserialize_with = "crate::de::vec",
1249        skip_serializing_if = "Vec::is_empty"
1250    )]
1251    pub integrations: Vec<serde_json::Value>,
1252    #[serde(
1253        default,
1254        deserialize_with = "crate::de::opt_string",
1255        skip_serializing_if = "Option::is_none"
1256    )]
1257    pub icon: Option<String>,
1258    #[serde(
1259        default,
1260        deserialize_with = "crate::de::opt_string",
1261        skip_serializing_if = "Option::is_none"
1262    )]
1263    pub description: Option<String>,
1264    #[serde(
1265        default,
1266        deserialize_with = "crate::de::vec",
1267        skip_serializing_if = "Vec::is_empty"
1268    )]
1269    pub description_blocks: Vec<crate::blocks::Block>,
1270    #[serde(
1271        default,
1272        deserialize_with = "crate::de::opt_bool",
1273        skip_serializing_if = "Option::is_none"
1274    )]
1275    pub is_trial: Option<bool>,
1276    #[serde(
1277        default,
1278        deserialize_with = "crate::de::vec",
1279        skip_serializing_if = "Vec::is_empty"
1280    )]
1281    pub subtask_schema: Vec<SlackListsItemsInfoResponseListListMetadataSubtaskSchema>,
1282    #[serde(
1283        default,
1284        deserialize_with = "crate::de::opt_object",
1285        skip_serializing_if = "Option::is_none"
1286    )]
1287    pub creation_source: Option<SlackListsItemsInfoResponseListListMetadataCreationSource>,
1288    #[serde(
1289        default,
1290        deserialize_with = "crate::de::opt_bool",
1291        skip_serializing_if = "Option::is_none"
1292    )]
1293    pub todo_mode: Option<bool>,
1294    #[serde(
1295        default,
1296        deserialize_with = "crate::de::opt_string",
1297        skip_serializing_if = "Option::is_none"
1298    )]
1299    pub default_view: Option<String>,
1300}
1301
1302#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1303pub struct SlackListsItemsInfoResponseListListMetadataSchema {
1304    #[serde(
1305        default,
1306        deserialize_with = "crate::de::opt_string",
1307        skip_serializing_if = "Option::is_none"
1308    )]
1309    pub id: Option<String>,
1310    #[serde(
1311        default,
1312        deserialize_with = "crate::de::opt_string",
1313        skip_serializing_if = "Option::is_none"
1314    )]
1315    pub name: Option<String>,
1316    #[serde(
1317        default,
1318        deserialize_with = "crate::de::opt_string",
1319        skip_serializing_if = "Option::is_none"
1320    )]
1321    pub key: Option<String>,
1322    #[serde(
1323        default,
1324        deserialize_with = "crate::de::opt_string",
1325        skip_serializing_if = "Option::is_none"
1326    )]
1327    pub r#type: Option<String>,
1328    #[serde(
1329        default,
1330        deserialize_with = "crate::de::opt_bool",
1331        skip_serializing_if = "Option::is_none"
1332    )]
1333    pub is_primary_column: Option<bool>,
1334    #[serde(
1335        default,
1336        deserialize_with = "crate::de::opt_object",
1337        skip_serializing_if = "Option::is_none"
1338    )]
1339    pub options: Option<SlackListsItemsInfoResponseListListMetadataSchemaOptions>,
1340}
1341
1342#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1343pub struct SlackListsItemsInfoResponseListListMetadataSchemaOptions {
1344    #[serde(
1345        default,
1346        deserialize_with = "crate::de::opt_i64",
1347        skip_serializing_if = "Option::is_none"
1348    )]
1349    pub precision: Option<i64>,
1350    #[serde(
1351        default,
1352        deserialize_with = "crate::de::opt_bool",
1353        skip_serializing_if = "Option::is_none"
1354    )]
1355    pub show_member_name: Option<bool>,
1356    #[serde(
1357        default,
1358        deserialize_with = "crate::de::vec",
1359        skip_serializing_if = "Vec::is_empty"
1360    )]
1361    pub choices: Vec<SlackListsItemsInfoResponseListListMetadataSchemaOptionsChoices>,
1362    #[serde(
1363        default,
1364        deserialize_with = "crate::de::opt_string",
1365        skip_serializing_if = "Option::is_none"
1366    )]
1367    pub format: Option<String>,
1368    #[serde(
1369        default,
1370        deserialize_with = "crate::de::opt_string",
1371        skip_serializing_if = "Option::is_none"
1372    )]
1373    pub emoji: Option<String>,
1374    #[serde(
1375        default,
1376        deserialize_with = "crate::de::opt_i64",
1377        skip_serializing_if = "Option::is_none"
1378    )]
1379    pub max: Option<i64>,
1380}
1381
1382#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1383pub struct SlackListsItemsInfoResponseListListMetadataSchemaOptionsChoices {
1384    #[serde(
1385        default,
1386        deserialize_with = "crate::de::opt_string",
1387        skip_serializing_if = "Option::is_none"
1388    )]
1389    pub value: Option<String>,
1390    #[serde(
1391        default,
1392        deserialize_with = "crate::de::opt_string",
1393        skip_serializing_if = "Option::is_none"
1394    )]
1395    pub label: Option<String>,
1396    #[serde(
1397        default,
1398        deserialize_with = "crate::de::opt_string",
1399        skip_serializing_if = "Option::is_none"
1400    )]
1401    pub color: Option<String>,
1402}
1403
1404#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1405pub struct SlackListsItemsInfoResponseListListMetadataViews {
1406    #[serde(
1407        default,
1408        deserialize_with = "crate::de::opt_string",
1409        skip_serializing_if = "Option::is_none"
1410    )]
1411    pub id: Option<String>,
1412    #[serde(
1413        default,
1414        deserialize_with = "crate::de::opt_string",
1415        skip_serializing_if = "Option::is_none"
1416    )]
1417    pub name: Option<String>,
1418    #[serde(
1419        default,
1420        deserialize_with = "crate::de::opt_string",
1421        skip_serializing_if = "Option::is_none"
1422    )]
1423    pub r#type: Option<String>,
1424    #[serde(
1425        default,
1426        deserialize_with = "crate::de::opt_bool",
1427        skip_serializing_if = "Option::is_none"
1428    )]
1429    pub is_locked: Option<bool>,
1430    #[serde(
1431        default,
1432        deserialize_with = "crate::de::opt_string",
1433        skip_serializing_if = "Option::is_none"
1434    )]
1435    pub position: Option<String>,
1436    #[serde(
1437        default,
1438        deserialize_with = "crate::de::vec",
1439        skip_serializing_if = "Vec::is_empty"
1440    )]
1441    pub columns: Vec<SlackListsItemsInfoResponseListListMetadataViewsColumns>,
1442    #[serde(
1443        default,
1444        deserialize_with = "crate::de::opt_i64",
1445        skip_serializing_if = "Option::is_none"
1446    )]
1447    pub date_created: Option<i64>,
1448    #[serde(
1449        default,
1450        deserialize_with = "crate::de::opt_string",
1451        skip_serializing_if = "Option::is_none"
1452    )]
1453    pub created_by: Option<String>,
1454    #[serde(
1455        default,
1456        deserialize_with = "crate::de::opt_bool",
1457        skip_serializing_if = "Option::is_none"
1458    )]
1459    pub stick_column_left: Option<bool>,
1460    #[serde(
1461        default,
1462        deserialize_with = "crate::de::opt_bool",
1463        skip_serializing_if = "Option::is_none"
1464    )]
1465    pub is_all_items_view: Option<bool>,
1466    #[serde(
1467        default,
1468        deserialize_with = "crate::de::opt_string",
1469        skip_serializing_if = "Option::is_none"
1470    )]
1471    pub default_view_key: Option<String>,
1472    #[serde(
1473        default,
1474        deserialize_with = "crate::de::opt_bool",
1475        skip_serializing_if = "Option::is_none"
1476    )]
1477    pub show_completed_items: Option<bool>,
1478}
1479
1480#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1481pub struct SlackListsItemsInfoResponseListListMetadataViewsColumns {
1482    #[serde(
1483        default,
1484        deserialize_with = "crate::de::opt_bool",
1485        skip_serializing_if = "Option::is_none"
1486    )]
1487    pub visible: Option<bool>,
1488    #[serde(
1489        default,
1490        deserialize_with = "crate::de::opt_string",
1491        skip_serializing_if = "Option::is_none"
1492    )]
1493    pub key: Option<String>,
1494    #[serde(
1495        default,
1496        deserialize_with = "crate::de::opt_string",
1497        skip_serializing_if = "Option::is_none"
1498    )]
1499    pub id: Option<String>,
1500    #[serde(
1501        default,
1502        deserialize_with = "crate::de::opt_string",
1503        skip_serializing_if = "Option::is_none"
1504    )]
1505    pub position: Option<String>,
1506}
1507
1508#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1509pub struct SlackListsItemsInfoResponseListListMetadataSubtaskSchema {
1510    #[serde(
1511        default,
1512        deserialize_with = "crate::de::opt_string",
1513        skip_serializing_if = "Option::is_none"
1514    )]
1515    pub id: Option<String>,
1516    #[serde(
1517        default,
1518        deserialize_with = "crate::de::opt_string",
1519        skip_serializing_if = "Option::is_none"
1520    )]
1521    pub name: Option<String>,
1522    #[serde(
1523        default,
1524        deserialize_with = "crate::de::opt_string",
1525        skip_serializing_if = "Option::is_none"
1526    )]
1527    pub key: Option<String>,
1528    #[serde(
1529        default,
1530        deserialize_with = "crate::de::opt_string",
1531        skip_serializing_if = "Option::is_none"
1532    )]
1533    pub r#type: Option<String>,
1534    #[serde(
1535        default,
1536        deserialize_with = "crate::de::opt_bool",
1537        skip_serializing_if = "Option::is_none"
1538    )]
1539    pub is_primary_column: Option<bool>,
1540}
1541
1542#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1543pub struct SlackListsItemsInfoResponseListListMetadataCreationSource {
1544    #[serde(
1545        default,
1546        deserialize_with = "crate::de::opt_string",
1547        skip_serializing_if = "Option::is_none"
1548    )]
1549    pub r#type: Option<String>,
1550    #[serde(
1551        default,
1552        deserialize_with = "crate::de::opt_string",
1553        skip_serializing_if = "Option::is_none"
1554    )]
1555    pub reference_id: Option<String>,
1556}
1557
1558#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1559pub struct SlackListsItemsInfoResponseListListLimits {
1560    #[serde(
1561        default,
1562        deserialize_with = "crate::de::opt_bool",
1563        skip_serializing_if = "Option::is_none"
1564    )]
1565    pub over_row_maximum: Option<bool>,
1566    #[serde(
1567        default,
1568        deserialize_with = "crate::de::opt_i64",
1569        skip_serializing_if = "Option::is_none"
1570    )]
1571    pub row_count_limit: Option<i64>,
1572    #[serde(
1573        default,
1574        deserialize_with = "crate::de::opt_i64",
1575        skip_serializing_if = "Option::is_none"
1576    )]
1577    pub row_count: Option<i64>,
1578    #[serde(
1579        default,
1580        deserialize_with = "crate::de::opt_i64",
1581        skip_serializing_if = "Option::is_none"
1582    )]
1583    pub archived_row_count: Option<i64>,
1584    #[serde(
1585        default,
1586        deserialize_with = "crate::de::opt_bool",
1587        skip_serializing_if = "Option::is_none"
1588    )]
1589    pub over_column_maximum: Option<bool>,
1590    #[serde(
1591        default,
1592        deserialize_with = "crate::de::opt_i64",
1593        skip_serializing_if = "Option::is_none"
1594    )]
1595    pub column_count: Option<i64>,
1596    #[serde(
1597        default,
1598        deserialize_with = "crate::de::opt_i64",
1599        skip_serializing_if = "Option::is_none"
1600    )]
1601    pub column_count_limit: Option<i64>,
1602    #[serde(
1603        default,
1604        deserialize_with = "crate::de::opt_bool",
1605        skip_serializing_if = "Option::is_none"
1606    )]
1607    pub over_view_maximum: Option<bool>,
1608    #[serde(
1609        default,
1610        deserialize_with = "crate::de::opt_i64",
1611        skip_serializing_if = "Option::is_none"
1612    )]
1613    pub view_count: Option<i64>,
1614    #[serde(
1615        default,
1616        deserialize_with = "crate::de::opt_i64",
1617        skip_serializing_if = "Option::is_none"
1618    )]
1619    pub view_count_limit: Option<i64>,
1620    #[serde(
1621        default,
1622        deserialize_with = "crate::de::opt_i64",
1623        skip_serializing_if = "Option::is_none"
1624    )]
1625    pub max_attachments_per_cell: Option<i64>,
1626}
1627
1628#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1629pub struct SlackListsItemsInfoResponseRecord {
1630    #[serde(
1631        default,
1632        deserialize_with = "crate::de::opt_string",
1633        skip_serializing_if = "Option::is_none"
1634    )]
1635    pub id: Option<String>,
1636    #[serde(
1637        default,
1638        deserialize_with = "crate::de::opt_string",
1639        skip_serializing_if = "Option::is_none"
1640    )]
1641    pub list_id: Option<String>,
1642    #[serde(
1643        default,
1644        deserialize_with = "crate::de::opt_i64",
1645        skip_serializing_if = "Option::is_none"
1646    )]
1647    pub date_created: Option<i64>,
1648    #[serde(
1649        default,
1650        deserialize_with = "crate::de::opt_string",
1651        skip_serializing_if = "Option::is_none"
1652    )]
1653    pub created_by: Option<String>,
1654    #[serde(
1655        default,
1656        deserialize_with = "crate::de::opt_string",
1657        skip_serializing_if = "Option::is_none"
1658    )]
1659    pub updated_by: Option<String>,
1660    #[serde(
1661        default,
1662        deserialize_with = "crate::de::vec",
1663        skip_serializing_if = "Vec::is_empty"
1664    )]
1665    pub fields: Vec<serde_json::Value>,
1666    #[serde(
1667        default,
1668        deserialize_with = "crate::de::opt_string",
1669        skip_serializing_if = "Option::is_none"
1670    )]
1671    pub updated_timestamp: Option<String>,
1672    #[serde(
1673        default,
1674        deserialize_with = "crate::de::opt_bool",
1675        skip_serializing_if = "Option::is_none"
1676    )]
1677    pub is_subscribed: Option<bool>,
1678}
1679
1680/// Arguments for the Slack Web API method [`slackLists.items.list`](https://docs.slack.dev/reference/methods/slackLists.items.list): Get records from a List.
1681///
1682/// Send it with [`SlackClient::slack_lists_items_list`].
1683#[doc(alias = "slackLists.items.list")]
1684#[derive(Debug, Clone, PartialEq, Serialize)]
1685#[non_exhaustive]
1686pub struct SlackListsItemsListRequest {
1687    /// ID of the List.
1688    pub list_id: String,
1689    /// The maximum number of records to return.
1690    #[serde(skip_serializing_if = "Option::is_none")]
1691    pub limit: Option<i64>,
1692    /// Next cursor for pagination.
1693    #[serde(skip_serializing_if = "Option::is_none")]
1694    pub cursor: Option<String>,
1695    /// Boolean indicating whether archived items or normal items should be returned.
1696    #[serde(skip_serializing_if = "Option::is_none")]
1697    pub archived: Option<bool>,
1698    /// Set to `true` to also return the parent `list` object, including its title, column schema, and total row count. Defaults to `false` to keep the response small.
1699    #[serde(skip_serializing_if = "Option::is_none")]
1700    pub include_list: Option<bool>,
1701}
1702
1703impl SlackListsItemsListRequest {
1704    pub fn new(list_id: impl Into<String>) -> Self {
1705        Self {
1706            list_id: list_id.into(),
1707            limit: None,
1708            cursor: None,
1709            archived: None,
1710            include_list: None,
1711        }
1712    }
1713
1714    pub fn limit(mut self, limit: i64) -> Self {
1715        self.limit = Some(limit);
1716        self
1717    }
1718
1719    pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
1720        self.cursor = Some(cursor.into());
1721        self
1722    }
1723
1724    pub fn archived(mut self, archived: bool) -> Self {
1725        self.archived = Some(archived);
1726        self
1727    }
1728
1729    pub fn include_list(mut self, include_list: bool) -> Self {
1730        self.include_list = Some(include_list);
1731        self
1732    }
1733}
1734
1735impl SlackApiMethod for SlackListsItemsListRequest {
1736    const METHOD: &'static str = "slackLists.items.list";
1737    type Response = SlackListsItemsListResponse;
1738}
1739
1740impl CursorPaginated for SlackListsItemsListRequest {
1741    fn set_cursor(&mut self, cursor: String) {
1742        self.cursor = Some(cursor);
1743    }
1744}
1745
1746impl NextCursor for SlackListsItemsListResponse {
1747    fn next_cursor(&self) -> Option<&str> {
1748        self.response_metadata.as_ref()?.next_cursor.as_deref()
1749    }
1750}
1751
1752/// Successful response of the Slack Web API method [`slackLists.items.list`](https://docs.slack.dev/reference/methods/slackLists.items.list).
1753#[doc(alias = "slackLists.items.list")]
1754#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1755pub struct SlackListsItemsListResponse {
1756    #[serde(
1757        default,
1758        deserialize_with = "crate::de::vec",
1759        skip_serializing_if = "Vec::is_empty"
1760    )]
1761    pub items: Vec<SlackListsItemsListResponseItems>,
1762    #[serde(
1763        default,
1764        deserialize_with = "crate::de::opt_object",
1765        skip_serializing_if = "Option::is_none"
1766    )]
1767    pub response_metadata: Option<ResponseMetadata>,
1768    #[serde(
1769        default,
1770        deserialize_with = "crate::de::opt_string",
1771        skip_serializing_if = "Option::is_none"
1772    )]
1773    pub warning: Option<String>,
1774}
1775
1776#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1777pub struct SlackListsItemsListResponseItems {
1778    #[serde(
1779        default,
1780        deserialize_with = "crate::de::opt_string",
1781        skip_serializing_if = "Option::is_none"
1782    )]
1783    pub id: Option<String>,
1784    #[serde(
1785        default,
1786        deserialize_with = "crate::de::opt_string",
1787        skip_serializing_if = "Option::is_none"
1788    )]
1789    pub list_id: Option<String>,
1790    #[serde(
1791        default,
1792        deserialize_with = "crate::de::opt_i64",
1793        skip_serializing_if = "Option::is_none"
1794    )]
1795    pub date_created: Option<i64>,
1796    #[serde(
1797        default,
1798        deserialize_with = "crate::de::opt_string",
1799        skip_serializing_if = "Option::is_none"
1800    )]
1801    pub created_by: Option<String>,
1802    #[serde(
1803        default,
1804        deserialize_with = "crate::de::opt_string",
1805        skip_serializing_if = "Option::is_none"
1806    )]
1807    pub updated_by: Option<String>,
1808    #[serde(
1809        default,
1810        deserialize_with = "crate::de::vec",
1811        skip_serializing_if = "Vec::is_empty"
1812    )]
1813    pub fields: Vec<SlackListsItemsListResponseItemsFields>,
1814    #[serde(
1815        default,
1816        deserialize_with = "crate::de::opt_string",
1817        skip_serializing_if = "Option::is_none"
1818    )]
1819    pub updated_timestamp: Option<String>,
1820}
1821
1822#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1823pub struct SlackListsItemsListResponseItemsFields {
1824    #[serde(
1825        default,
1826        deserialize_with = "crate::de::opt_string",
1827        skip_serializing_if = "Option::is_none"
1828    )]
1829    pub key: Option<String>,
1830    #[serde(
1831        default,
1832        deserialize_with = "crate::de::opt_string",
1833        skip_serializing_if = "Option::is_none"
1834    )]
1835    pub value: Option<String>,
1836    #[serde(
1837        default,
1838        deserialize_with = "crate::de::opt_string",
1839        skip_serializing_if = "Option::is_none"
1840    )]
1841    pub text: Option<String>,
1842    #[serde(
1843        default,
1844        deserialize_with = "crate::de::vec",
1845        skip_serializing_if = "Vec::is_empty"
1846    )]
1847    pub rich_text: Vec<SlackListsItemsListResponseItemsFieldsRichText>,
1848    #[serde(
1849        default,
1850        deserialize_with = "crate::de::opt_string",
1851        skip_serializing_if = "Option::is_none"
1852    )]
1853    pub column_id: Option<String>,
1854    #[serde(
1855        default,
1856        deserialize_with = "crate::de::vec",
1857        skip_serializing_if = "Vec::is_empty"
1858    )]
1859    pub number: Vec<i64>,
1860    #[serde(
1861        default,
1862        deserialize_with = "crate::de::vec",
1863        skip_serializing_if = "Vec::is_empty"
1864    )]
1865    pub select: Vec<String>,
1866    #[serde(
1867        default,
1868        deserialize_with = "crate::de::vec",
1869        skip_serializing_if = "Vec::is_empty"
1870    )]
1871    pub date: Vec<String>,
1872    #[serde(
1873        default,
1874        deserialize_with = "crate::de::vec",
1875        skip_serializing_if = "Vec::is_empty"
1876    )]
1877    pub timestamp: Vec<i64>,
1878    #[serde(
1879        default,
1880        deserialize_with = "crate::de::vec",
1881        skip_serializing_if = "Vec::is_empty"
1882    )]
1883    pub user: Vec<String>,
1884}
1885
1886#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1887pub struct SlackListsItemsListResponseItemsFieldsRichText {
1888    #[serde(
1889        default,
1890        deserialize_with = "crate::de::opt_string",
1891        skip_serializing_if = "Option::is_none"
1892    )]
1893    pub r#type: Option<String>,
1894    #[serde(
1895        default,
1896        deserialize_with = "crate::de::opt_string",
1897        skip_serializing_if = "Option::is_none"
1898    )]
1899    pub block_id: Option<String>,
1900    #[serde(
1901        default,
1902        deserialize_with = "crate::de::vec",
1903        skip_serializing_if = "Vec::is_empty"
1904    )]
1905    pub elements: Vec<SlackListsItemsListResponseItemsFieldsRichTextElements>,
1906}
1907
1908#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1909pub struct SlackListsItemsListResponseItemsFieldsRichTextElements {
1910    #[serde(
1911        default,
1912        deserialize_with = "crate::de::opt_string",
1913        skip_serializing_if = "Option::is_none"
1914    )]
1915    pub r#type: Option<String>,
1916    #[serde(
1917        default,
1918        deserialize_with = "crate::de::vec",
1919        skip_serializing_if = "Vec::is_empty"
1920    )]
1921    pub elements: Vec<SlackListsItemsListResponseItemsFieldsRichTextElementsElements>,
1922}
1923
1924#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1925pub struct SlackListsItemsListResponseItemsFieldsRichTextElementsElements {
1926    #[serde(
1927        default,
1928        deserialize_with = "crate::de::opt_string",
1929        skip_serializing_if = "Option::is_none"
1930    )]
1931    pub text: Option<String>,
1932    #[serde(
1933        default,
1934        deserialize_with = "crate::de::opt_string",
1935        skip_serializing_if = "Option::is_none"
1936    )]
1937    pub r#type: Option<String>,
1938    #[serde(
1939        default,
1940        deserialize_with = "crate::de::opt_object",
1941        skip_serializing_if = "Option::is_none"
1942    )]
1943    pub style: Option<SlackListsItemsListResponseItemsFieldsRichTextElementsElementsStyle>,
1944}
1945
1946#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1947pub struct SlackListsItemsListResponseItemsFieldsRichTextElementsElementsStyle {
1948    #[serde(
1949        default,
1950        deserialize_with = "crate::de::opt_bool",
1951        skip_serializing_if = "Option::is_none"
1952    )]
1953    pub bold: Option<bool>,
1954}
1955
1956/// Arguments for the Slack Web API method [`slackLists.items.update`](https://docs.slack.dev/reference/methods/slackLists.items.update): Updates cells in a List.
1957///
1958/// Send it with [`SlackClient::slack_lists_items_update`].
1959#[doc(alias = "slackLists.items.update")]
1960#[derive(Debug, Clone, PartialEq, Serialize)]
1961#[non_exhaustive]
1962pub struct SlackListsItemsUpdateRequest {
1963    /// ID of the List to add or update cells.
1964    pub list_id: String,
1965    /// Cells to update.
1966    #[serde(serialize_with = "crate::form::as_json")]
1967    pub cells: Vec<serde_json::Value>,
1968}
1969
1970impl SlackListsItemsUpdateRequest {
1971    pub fn new(list_id: impl Into<String>, cells: Vec<serde_json::Value>) -> Self {
1972        Self {
1973            list_id: list_id.into(),
1974            cells,
1975        }
1976    }
1977}
1978
1979impl SlackApiMethod for SlackListsItemsUpdateRequest {
1980    const METHOD: &'static str = "slackLists.items.update";
1981    type Response = SlackListsItemsUpdateResponse;
1982}
1983
1984/// Successful response of the Slack Web API method [`slackLists.items.update`](https://docs.slack.dev/reference/methods/slackLists.items.update).
1985#[doc(alias = "slackLists.items.update")]
1986#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1987pub struct SlackListsItemsUpdateResponse {
1988    /// Fields returned by Slack. This method has no documented response example.
1989    #[serde(flatten)]
1990    pub extra: serde_json::Map<String, serde_json::Value>,
1991    #[serde(
1992        default,
1993        deserialize_with = "crate::de::opt_object",
1994        skip_serializing_if = "Option::is_none"
1995    )]
1996    pub response_metadata: Option<ResponseMetadata>,
1997    #[serde(
1998        default,
1999        deserialize_with = "crate::de::opt_string",
2000        skip_serializing_if = "Option::is_none"
2001    )]
2002    pub warning: Option<String>,
2003}
2004
2005/// Arguments for the Slack Web API method [`slackLists.update`](https://docs.slack.dev/reference/methods/slackLists.update): Update a List.
2006///
2007/// Send it with [`SlackClient::slack_lists_update`].
2008#[doc(alias = "slackLists.update")]
2009#[derive(Debug, Clone, PartialEq, Serialize)]
2010#[non_exhaustive]
2011pub struct SlackListsUpdateRequest {
2012    /// The ID of the List to update.
2013    pub id: String,
2014    /// The updated name of the List.
2015    #[serde(skip_serializing_if = "Option::is_none")]
2016    pub name: Option<String>,
2017    /// A rich text description of the List.
2018    #[serde(
2019        skip_serializing_if = "Option::is_none",
2020        serialize_with = "crate::form::as_json"
2021    )]
2022    pub description_blocks: Option<Vec<crate::blocks::Block>>,
2023    /// Boolean indicating whether the List should be in todo mode.
2024    #[serde(skip_serializing_if = "Option::is_none")]
2025    pub todo_mode: Option<bool>,
2026}
2027
2028impl SlackListsUpdateRequest {
2029    pub fn new(id: impl Into<String>) -> Self {
2030        Self {
2031            id: id.into(),
2032            name: None,
2033            description_blocks: None,
2034            todo_mode: None,
2035        }
2036    }
2037
2038    pub fn name(mut self, name: impl Into<String>) -> Self {
2039        self.name = Some(name.into());
2040        self
2041    }
2042
2043    pub fn description_blocks(mut self, description_blocks: Vec<crate::blocks::Block>) -> Self {
2044        self.description_blocks = Some(description_blocks);
2045        self
2046    }
2047
2048    pub fn todo_mode(mut self, todo_mode: bool) -> Self {
2049        self.todo_mode = Some(todo_mode);
2050        self
2051    }
2052}
2053
2054impl SlackApiMethod for SlackListsUpdateRequest {
2055    const METHOD: &'static str = "slackLists.update";
2056    type Response = SlackListsUpdateResponse;
2057}
2058
2059/// Successful response of the Slack Web API method [`slackLists.update`](https://docs.slack.dev/reference/methods/slackLists.update).
2060#[doc(alias = "slackLists.update")]
2061#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2062pub struct SlackListsUpdateResponse {
2063    /// Fields returned by Slack. This method has no documented response example.
2064    #[serde(flatten)]
2065    pub extra: serde_json::Map<String, serde_json::Value>,
2066    #[serde(
2067        default,
2068        deserialize_with = "crate::de::opt_object",
2069        skip_serializing_if = "Option::is_none"
2070    )]
2071    pub response_metadata: Option<ResponseMetadata>,
2072    #[serde(
2073        default,
2074        deserialize_with = "crate::de::opt_string",
2075        skip_serializing_if = "Option::is_none"
2076    )]
2077    pub warning: Option<String>,
2078}
2079
2080impl SlackClient {
2081    /// Calls the Slack Web API method [`slackLists.access.delete`](https://docs.slack.dev/reference/methods/slackLists.access.delete): Revoke access to a List for specified entities.
2082    ///
2083    /// Required scopes:
2084    ///
2085    /// - bot token: `lists:write`
2086    /// - user token: `lists:write`
2087    ///
2088    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2089    ///
2090    /// # Errors
2091    ///
2092    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2093    #[doc(alias = "slackLists.access.delete")]
2094    pub async fn slack_lists_access_delete(
2095        &self,
2096        request: &SlackListsAccessDeleteRequest,
2097    ) -> Result<SlackListsAccessDeleteResponse, SlackError> {
2098        self.call(request).await
2099    }
2100
2101    /// Calls the Slack Web API method [`slackLists.access.set`](https://docs.slack.dev/reference/methods/slackLists.access.set): Set the access level to a List for specified entities.
2102    ///
2103    /// Required scopes:
2104    ///
2105    /// - bot token: `lists:write`
2106    /// - user token: `lists:write`
2107    ///
2108    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2109    ///
2110    /// # Errors
2111    ///
2112    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2113    #[doc(alias = "slackLists.access.set")]
2114    pub async fn slack_lists_access_set(
2115        &self,
2116        request: &SlackListsAccessSetRequest,
2117    ) -> Result<SlackListsAccessSetResponse, SlackError> {
2118        self.call(request).await
2119    }
2120
2121    /// Calls the Slack Web API method [`slackLists.create`](https://docs.slack.dev/reference/methods/slackLists.create): Create a List.
2122    ///
2123    /// Required scopes:
2124    ///
2125    /// - bot token: `lists:write`
2126    /// - user token: `lists:write`
2127    ///
2128    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2129    ///
2130    /// # Errors
2131    ///
2132    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2133    #[doc(alias = "slackLists.create")]
2134    pub async fn slack_lists_create(
2135        &self,
2136        request: &SlackListsCreateRequest,
2137    ) -> Result<SlackListsCreateResponse, SlackError> {
2138        self.call(request).await
2139    }
2140
2141    /// Calls the Slack Web API method [`slackLists.download.get`](https://docs.slack.dev/reference/methods/slackLists.download.get): Retrieve List download URL from an export job to download List contents.
2142    ///
2143    /// Required scopes:
2144    ///
2145    /// - bot token: `lists:read`
2146    /// - user token: `lists:read`
2147    ///
2148    /// Rate limit: Tier 4 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2149    ///
2150    /// # Errors
2151    ///
2152    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2153    #[doc(alias = "slackLists.download.get")]
2154    pub async fn slack_lists_download_get(
2155        &self,
2156        request: &SlackListsDownloadGetRequest,
2157    ) -> Result<SlackListsDownloadGetResponse, SlackError> {
2158        self.call(request).await
2159    }
2160
2161    /// Calls the Slack Web API method [`slackLists.download.start`](https://docs.slack.dev/reference/methods/slackLists.download.start): Initiate a job to export List contents.
2162    ///
2163    /// Required scopes:
2164    ///
2165    /// - bot token: `lists:read`
2166    /// - user token: `lists:read`
2167    ///
2168    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2169    ///
2170    /// # Errors
2171    ///
2172    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2173    #[doc(alias = "slackLists.download.start")]
2174    pub async fn slack_lists_download_start(
2175        &self,
2176        request: &SlackListsDownloadStartRequest,
2177    ) -> Result<SlackListsDownloadStartResponse, SlackError> {
2178        self.call(request).await
2179    }
2180
2181    /// Calls the Slack Web API method [`slackLists.items.create`](https://docs.slack.dev/reference/methods/slackLists.items.create): Add a new item to an existing List.
2182    ///
2183    /// Required scopes:
2184    ///
2185    /// - bot token: `lists:write`
2186    /// - user token: `lists:write`
2187    ///
2188    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2189    ///
2190    /// # Errors
2191    ///
2192    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2193    #[doc(alias = "slackLists.items.create")]
2194    pub async fn slack_lists_items_create(
2195        &self,
2196        request: &SlackListsItemsCreateRequest,
2197    ) -> Result<SlackListsItemsCreateResponse, SlackError> {
2198        self.call(request).await
2199    }
2200
2201    /// Calls the Slack Web API method [`slackLists.items.delete`](https://docs.slack.dev/reference/methods/slackLists.items.delete): Deletes an item from an existing List.
2202    ///
2203    /// Required scopes:
2204    ///
2205    /// - bot token: `lists:write`
2206    /// - user token: `lists:write`
2207    ///
2208    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2209    ///
2210    /// # Errors
2211    ///
2212    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2213    #[doc(alias = "slackLists.items.delete")]
2214    pub async fn slack_lists_items_delete(
2215        &self,
2216        request: &SlackListsItemsDeleteRequest,
2217    ) -> Result<SlackListsItemsDeleteResponse, SlackError> {
2218        self.call(request).await
2219    }
2220
2221    /// Calls the Slack Web API method [`slackLists.items.deleteMultiple`](https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple): Deletes multiple items from an existing List.
2222    ///
2223    /// Required scopes:
2224    ///
2225    /// - bot token: `lists:write`
2226    /// - user token: `lists:write`
2227    ///
2228    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2229    ///
2230    /// # Errors
2231    ///
2232    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2233    #[doc(alias = "slackLists.items.deleteMultiple")]
2234    pub async fn slack_lists_items_delete_multiple(
2235        &self,
2236        request: &SlackListsItemsDeleteMultipleRequest,
2237    ) -> Result<SlackListsItemsDeleteMultipleResponse, SlackError> {
2238        self.call(request).await
2239    }
2240
2241    /// Calls the Slack Web API method [`slackLists.items.info`](https://docs.slack.dev/reference/methods/slackLists.items.info): Get a row from a List.
2242    ///
2243    /// Required scopes:
2244    ///
2245    /// - bot token: `lists:read`
2246    /// - user token: `lists:read`
2247    ///
2248    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2249    ///
2250    /// # Errors
2251    ///
2252    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2253    #[doc(alias = "slackLists.items.info")]
2254    pub async fn slack_lists_items_info(
2255        &self,
2256        request: &SlackListsItemsInfoRequest,
2257    ) -> Result<SlackListsItemsInfoResponse, SlackError> {
2258        self.call(request).await
2259    }
2260
2261    /// Calls the Slack Web API method [`slackLists.items.list`](https://docs.slack.dev/reference/methods/slackLists.items.list): Get records from a List.
2262    ///
2263    /// Required scopes:
2264    ///
2265    /// - bot token: `lists:read`
2266    /// - user token: `lists:read`
2267    ///
2268    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2269    ///
2270    /// # Errors
2271    ///
2272    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2273    #[doc(alias = "slackLists.items.list")]
2274    pub async fn slack_lists_items_list(
2275        &self,
2276        request: &SlackListsItemsListRequest,
2277    ) -> Result<SlackListsItemsListResponse, SlackError> {
2278        self.call(request).await
2279    }
2280
2281    /// Calls the Slack Web API method [`slackLists.items.update`](https://docs.slack.dev/reference/methods/slackLists.items.update): Updates cells in a List.
2282    ///
2283    /// Required scopes:
2284    ///
2285    /// - bot token: `lists:write`
2286    /// - user token: `lists:write`
2287    ///
2288    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2289    ///
2290    /// # Errors
2291    ///
2292    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2293    #[doc(alias = "slackLists.items.update")]
2294    pub async fn slack_lists_items_update(
2295        &self,
2296        request: &SlackListsItemsUpdateRequest,
2297    ) -> Result<SlackListsItemsUpdateResponse, SlackError> {
2298        self.call(request).await
2299    }
2300
2301    /// Calls the Slack Web API method [`slackLists.update`](https://docs.slack.dev/reference/methods/slackLists.update): Update a List.
2302    ///
2303    /// Required scopes:
2304    ///
2305    /// - bot token: `lists:write`
2306    /// - user token: `lists:write`
2307    ///
2308    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
2309    ///
2310    /// # Errors
2311    ///
2312    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
2313    #[doc(alias = "slackLists.update")]
2314    pub async fn slack_lists_update(
2315        &self,
2316        request: &SlackListsUpdateRequest,
2317    ) -> Result<SlackListsUpdateResponse, SlackError> {
2318        self.call(request).await
2319    }
2320}