aws_sdk_codebuild/operation/list_reports/_list_reports_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ListReportsInput {
6 /// <p>Specifies the sort order for the list of returned reports. Valid values are:</p>
7 /// <ul>
8 /// <li>
9 /// <p><code>ASCENDING</code>: return reports in chronological order based on their creation date.</p></li>
10 /// <li>
11 /// <p><code>DESCENDING</code>: return reports in the reverse chronological order based on their creation date.</p></li>
12 /// </ul>
13 pub sort_order: ::std::option::Option<crate::types::SortOrderType>,
14 /// <p>During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.</p>
15 pub next_token: ::std::option::Option<::std::string::String>,
16 /// <p>The maximum number of paginated reports returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>Report</code> objects. The default value is 100.</p>
17 pub max_results: ::std::option::Option<i32>,
18 /// <p>A <code>ReportFilter</code> object used to filter the returned reports.</p>
19 pub filter: ::std::option::Option<crate::types::ReportFilter>,
20}
21impl ListReportsInput {
22 /// <p>Specifies the sort order for the list of returned reports. Valid values are:</p>
23 /// <ul>
24 /// <li>
25 /// <p><code>ASCENDING</code>: return reports in chronological order based on their creation date.</p></li>
26 /// <li>
27 /// <p><code>DESCENDING</code>: return reports in the reverse chronological order based on their creation date.</p></li>
28 /// </ul>
29 pub fn sort_order(&self) -> ::std::option::Option<&crate::types::SortOrderType> {
30 self.sort_order.as_ref()
31 }
32 /// <p>During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.</p>
33 pub fn next_token(&self) -> ::std::option::Option<&str> {
34 self.next_token.as_deref()
35 }
36 /// <p>The maximum number of paginated reports returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>Report</code> objects. The default value is 100.</p>
37 pub fn max_results(&self) -> ::std::option::Option<i32> {
38 self.max_results
39 }
40 /// <p>A <code>ReportFilter</code> object used to filter the returned reports.</p>
41 pub fn filter(&self) -> ::std::option::Option<&crate::types::ReportFilter> {
42 self.filter.as_ref()
43 }
44}
45impl ListReportsInput {
46 /// Creates a new builder-style object to manufacture [`ListReportsInput`](crate::operation::list_reports::ListReportsInput).
47 pub fn builder() -> crate::operation::list_reports::builders::ListReportsInputBuilder {
48 crate::operation::list_reports::builders::ListReportsInputBuilder::default()
49 }
50}
51
52/// A builder for [`ListReportsInput`](crate::operation::list_reports::ListReportsInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct ListReportsInputBuilder {
56 pub(crate) sort_order: ::std::option::Option<crate::types::SortOrderType>,
57 pub(crate) next_token: ::std::option::Option<::std::string::String>,
58 pub(crate) max_results: ::std::option::Option<i32>,
59 pub(crate) filter: ::std::option::Option<crate::types::ReportFilter>,
60}
61impl ListReportsInputBuilder {
62 /// <p>Specifies the sort order for the list of returned reports. Valid values are:</p>
63 /// <ul>
64 /// <li>
65 /// <p><code>ASCENDING</code>: return reports in chronological order based on their creation date.</p></li>
66 /// <li>
67 /// <p><code>DESCENDING</code>: return reports in the reverse chronological order based on their creation date.</p></li>
68 /// </ul>
69 pub fn sort_order(mut self, input: crate::types::SortOrderType) -> Self {
70 self.sort_order = ::std::option::Option::Some(input);
71 self
72 }
73 /// <p>Specifies the sort order for the list of returned reports. Valid values are:</p>
74 /// <ul>
75 /// <li>
76 /// <p><code>ASCENDING</code>: return reports in chronological order based on their creation date.</p></li>
77 /// <li>
78 /// <p><code>DESCENDING</code>: return reports in the reverse chronological order based on their creation date.</p></li>
79 /// </ul>
80 pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::SortOrderType>) -> Self {
81 self.sort_order = input;
82 self
83 }
84 /// <p>Specifies the sort order for the list of returned reports. Valid values are:</p>
85 /// <ul>
86 /// <li>
87 /// <p><code>ASCENDING</code>: return reports in chronological order based on their creation date.</p></li>
88 /// <li>
89 /// <p><code>DESCENDING</code>: return reports in the reverse chronological order based on their creation date.</p></li>
90 /// </ul>
91 pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::SortOrderType> {
92 &self.sort_order
93 }
94 /// <p>During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.</p>
95 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.next_token = ::std::option::Option::Some(input.into());
97 self
98 }
99 /// <p>During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.</p>
100 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.next_token = input;
102 self
103 }
104 /// <p>During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.</p>
105 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
106 &self.next_token
107 }
108 /// <p>The maximum number of paginated reports returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>Report</code> objects. The default value is 100.</p>
109 pub fn max_results(mut self, input: i32) -> Self {
110 self.max_results = ::std::option::Option::Some(input);
111 self
112 }
113 /// <p>The maximum number of paginated reports returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>Report</code> objects. The default value is 100.</p>
114 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
115 self.max_results = input;
116 self
117 }
118 /// <p>The maximum number of paginated reports returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>Report</code> objects. The default value is 100.</p>
119 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
120 &self.max_results
121 }
122 /// <p>A <code>ReportFilter</code> object used to filter the returned reports.</p>
123 pub fn filter(mut self, input: crate::types::ReportFilter) -> Self {
124 self.filter = ::std::option::Option::Some(input);
125 self
126 }
127 /// <p>A <code>ReportFilter</code> object used to filter the returned reports.</p>
128 pub fn set_filter(mut self, input: ::std::option::Option<crate::types::ReportFilter>) -> Self {
129 self.filter = input;
130 self
131 }
132 /// <p>A <code>ReportFilter</code> object used to filter the returned reports.</p>
133 pub fn get_filter(&self) -> &::std::option::Option<crate::types::ReportFilter> {
134 &self.filter
135 }
136 /// Consumes the builder and constructs a [`ListReportsInput`](crate::operation::list_reports::ListReportsInput).
137 pub fn build(self) -> ::std::result::Result<crate::operation::list_reports::ListReportsInput, ::aws_smithy_types::error::operation::BuildError> {
138 ::std::result::Result::Ok(crate::operation::list_reports::ListReportsInput {
139 sort_order: self.sort_order,
140 next_token: self.next_token,
141 max_results: self.max_results,
142 filter: self.filter,
143 })
144 }
145}