aws_sdk_swf/operation/count_pending_activity_tasks/
_count_pending_activity_tasks_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the count of tasks in a task list.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CountPendingActivityTasksOutput {
7    /// <p>The number of tasks in the task list.</p>
8    pub count: i32,
9    /// <p>If set to true, indicates that the actual count was more than the maximum supported by this API and the count returned is the truncated value.</p>
10    pub truncated: bool,
11    _request_id: Option<String>,
12}
13impl CountPendingActivityTasksOutput {
14    /// <p>The number of tasks in the task list.</p>
15    pub fn count(&self) -> i32 {
16        self.count
17    }
18    /// <p>If set to true, indicates that the actual count was more than the maximum supported by this API and the count returned is the truncated value.</p>
19    pub fn truncated(&self) -> bool {
20        self.truncated
21    }
22}
23impl ::aws_types::request_id::RequestId for CountPendingActivityTasksOutput {
24    fn request_id(&self) -> Option<&str> {
25        self._request_id.as_deref()
26    }
27}
28impl CountPendingActivityTasksOutput {
29    /// Creates a new builder-style object to manufacture [`CountPendingActivityTasksOutput`](crate::operation::count_pending_activity_tasks::CountPendingActivityTasksOutput).
30    pub fn builder() -> crate::operation::count_pending_activity_tasks::builders::CountPendingActivityTasksOutputBuilder {
31        crate::operation::count_pending_activity_tasks::builders::CountPendingActivityTasksOutputBuilder::default()
32    }
33}
34
35/// A builder for [`CountPendingActivityTasksOutput`](crate::operation::count_pending_activity_tasks::CountPendingActivityTasksOutput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct CountPendingActivityTasksOutputBuilder {
39    pub(crate) count: ::std::option::Option<i32>,
40    pub(crate) truncated: ::std::option::Option<bool>,
41    _request_id: Option<String>,
42}
43impl CountPendingActivityTasksOutputBuilder {
44    /// <p>The number of tasks in the task list.</p>
45    /// This field is required.
46    pub fn count(mut self, input: i32) -> Self {
47        self.count = ::std::option::Option::Some(input);
48        self
49    }
50    /// <p>The number of tasks in the task list.</p>
51    pub fn set_count(mut self, input: ::std::option::Option<i32>) -> Self {
52        self.count = input;
53        self
54    }
55    /// <p>The number of tasks in the task list.</p>
56    pub fn get_count(&self) -> &::std::option::Option<i32> {
57        &self.count
58    }
59    /// <p>If set to true, indicates that the actual count was more than the maximum supported by this API and the count returned is the truncated value.</p>
60    pub fn truncated(mut self, input: bool) -> Self {
61        self.truncated = ::std::option::Option::Some(input);
62        self
63    }
64    /// <p>If set to true, indicates that the actual count was more than the maximum supported by this API and the count returned is the truncated value.</p>
65    pub fn set_truncated(mut self, input: ::std::option::Option<bool>) -> Self {
66        self.truncated = input;
67        self
68    }
69    /// <p>If set to true, indicates that the actual count was more than the maximum supported by this API and the count returned is the truncated value.</p>
70    pub fn get_truncated(&self) -> &::std::option::Option<bool> {
71        &self.truncated
72    }
73    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
74        self._request_id = Some(request_id.into());
75        self
76    }
77
78    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
79        self._request_id = request_id;
80        self
81    }
82    /// Consumes the builder and constructs a [`CountPendingActivityTasksOutput`](crate::operation::count_pending_activity_tasks::CountPendingActivityTasksOutput).
83    pub fn build(self) -> crate::operation::count_pending_activity_tasks::CountPendingActivityTasksOutput {
84        crate::operation::count_pending_activity_tasks::CountPendingActivityTasksOutput {
85            count: self.count.unwrap_or_default(),
86            truncated: self.truncated.unwrap_or_default(),
87            _request_id: self._request_id,
88        }
89    }
90}