aws_sdk_sagemaker/operation/list_pipeline_executions/
_list_pipeline_executions_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 ListPipelineExecutionsInput {
6    /// <p>The name or Amazon Resource Name (ARN) of the pipeline.</p>
7    pub pipeline_name: ::std::option::Option<::std::string::String>,
8    /// <p>A filter that returns the pipeline executions that were created after a specified time.</p>
9    pub created_after: ::std::option::Option<::aws_smithy_types::DateTime>,
10    /// <p>A filter that returns the pipeline executions that were created before a specified time.</p>
11    pub created_before: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>The field by which to sort results. The default is <code>CreatedTime</code>.</p>
13    pub sort_by: ::std::option::Option<crate::types::SortPipelineExecutionsBy>,
14    /// <p>The sort order for results.</p>
15    pub sort_order: ::std::option::Option<crate::types::SortOrder>,
16    /// <p>If the result of the previous <code>ListPipelineExecutions</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of pipeline executions, use the token in the next request.</p>
17    pub next_token: ::std::option::Option<::std::string::String>,
18    /// <p>The maximum number of pipeline executions to return in the response.</p>
19    pub max_results: ::std::option::Option<i32>,
20}
21impl ListPipelineExecutionsInput {
22    /// <p>The name or Amazon Resource Name (ARN) of the pipeline.</p>
23    pub fn pipeline_name(&self) -> ::std::option::Option<&str> {
24        self.pipeline_name.as_deref()
25    }
26    /// <p>A filter that returns the pipeline executions that were created after a specified time.</p>
27    pub fn created_after(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
28        self.created_after.as_ref()
29    }
30    /// <p>A filter that returns the pipeline executions that were created before a specified time.</p>
31    pub fn created_before(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
32        self.created_before.as_ref()
33    }
34    /// <p>The field by which to sort results. The default is <code>CreatedTime</code>.</p>
35    pub fn sort_by(&self) -> ::std::option::Option<&crate::types::SortPipelineExecutionsBy> {
36        self.sort_by.as_ref()
37    }
38    /// <p>The sort order for results.</p>
39    pub fn sort_order(&self) -> ::std::option::Option<&crate::types::SortOrder> {
40        self.sort_order.as_ref()
41    }
42    /// <p>If the result of the previous <code>ListPipelineExecutions</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of pipeline executions, use the token in the next request.</p>
43    pub fn next_token(&self) -> ::std::option::Option<&str> {
44        self.next_token.as_deref()
45    }
46    /// <p>The maximum number of pipeline executions to return in the response.</p>
47    pub fn max_results(&self) -> ::std::option::Option<i32> {
48        self.max_results
49    }
50}
51impl ListPipelineExecutionsInput {
52    /// Creates a new builder-style object to manufacture [`ListPipelineExecutionsInput`](crate::operation::list_pipeline_executions::ListPipelineExecutionsInput).
53    pub fn builder() -> crate::operation::list_pipeline_executions::builders::ListPipelineExecutionsInputBuilder {
54        crate::operation::list_pipeline_executions::builders::ListPipelineExecutionsInputBuilder::default()
55    }
56}
57
58/// A builder for [`ListPipelineExecutionsInput`](crate::operation::list_pipeline_executions::ListPipelineExecutionsInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct ListPipelineExecutionsInputBuilder {
62    pub(crate) pipeline_name: ::std::option::Option<::std::string::String>,
63    pub(crate) created_after: ::std::option::Option<::aws_smithy_types::DateTime>,
64    pub(crate) created_before: ::std::option::Option<::aws_smithy_types::DateTime>,
65    pub(crate) sort_by: ::std::option::Option<crate::types::SortPipelineExecutionsBy>,
66    pub(crate) sort_order: ::std::option::Option<crate::types::SortOrder>,
67    pub(crate) next_token: ::std::option::Option<::std::string::String>,
68    pub(crate) max_results: ::std::option::Option<i32>,
69}
70impl ListPipelineExecutionsInputBuilder {
71    /// <p>The name or Amazon Resource Name (ARN) of the pipeline.</p>
72    /// This field is required.
73    pub fn pipeline_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.pipeline_name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The name or Amazon Resource Name (ARN) of the pipeline.</p>
78    pub fn set_pipeline_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.pipeline_name = input;
80        self
81    }
82    /// <p>The name or Amazon Resource Name (ARN) of the pipeline.</p>
83    pub fn get_pipeline_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.pipeline_name
85    }
86    /// <p>A filter that returns the pipeline executions that were created after a specified time.</p>
87    pub fn created_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
88        self.created_after = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>A filter that returns the pipeline executions that were created after a specified time.</p>
92    pub fn set_created_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
93        self.created_after = input;
94        self
95    }
96    /// <p>A filter that returns the pipeline executions that were created after a specified time.</p>
97    pub fn get_created_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
98        &self.created_after
99    }
100    /// <p>A filter that returns the pipeline executions that were created before a specified time.</p>
101    pub fn created_before(mut self, input: ::aws_smithy_types::DateTime) -> Self {
102        self.created_before = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>A filter that returns the pipeline executions that were created before a specified time.</p>
106    pub fn set_created_before(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
107        self.created_before = input;
108        self
109    }
110    /// <p>A filter that returns the pipeline executions that were created before a specified time.</p>
111    pub fn get_created_before(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
112        &self.created_before
113    }
114    /// <p>The field by which to sort results. The default is <code>CreatedTime</code>.</p>
115    pub fn sort_by(mut self, input: crate::types::SortPipelineExecutionsBy) -> Self {
116        self.sort_by = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>The field by which to sort results. The default is <code>CreatedTime</code>.</p>
120    pub fn set_sort_by(mut self, input: ::std::option::Option<crate::types::SortPipelineExecutionsBy>) -> Self {
121        self.sort_by = input;
122        self
123    }
124    /// <p>The field by which to sort results. The default is <code>CreatedTime</code>.</p>
125    pub fn get_sort_by(&self) -> &::std::option::Option<crate::types::SortPipelineExecutionsBy> {
126        &self.sort_by
127    }
128    /// <p>The sort order for results.</p>
129    pub fn sort_order(mut self, input: crate::types::SortOrder) -> Self {
130        self.sort_order = ::std::option::Option::Some(input);
131        self
132    }
133    /// <p>The sort order for results.</p>
134    pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
135        self.sort_order = input;
136        self
137    }
138    /// <p>The sort order for results.</p>
139    pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
140        &self.sort_order
141    }
142    /// <p>If the result of the previous <code>ListPipelineExecutions</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of pipeline executions, use the token in the next request.</p>
143    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.next_token = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>If the result of the previous <code>ListPipelineExecutions</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of pipeline executions, use the token in the next request.</p>
148    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.next_token = input;
150        self
151    }
152    /// <p>If the result of the previous <code>ListPipelineExecutions</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of pipeline executions, use the token in the next request.</p>
153    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
154        &self.next_token
155    }
156    /// <p>The maximum number of pipeline executions to return in the response.</p>
157    pub fn max_results(mut self, input: i32) -> Self {
158        self.max_results = ::std::option::Option::Some(input);
159        self
160    }
161    /// <p>The maximum number of pipeline executions to return in the response.</p>
162    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
163        self.max_results = input;
164        self
165    }
166    /// <p>The maximum number of pipeline executions to return in the response.</p>
167    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
168        &self.max_results
169    }
170    /// Consumes the builder and constructs a [`ListPipelineExecutionsInput`](crate::operation::list_pipeline_executions::ListPipelineExecutionsInput).
171    pub fn build(
172        self,
173    ) -> ::std::result::Result<
174        crate::operation::list_pipeline_executions::ListPipelineExecutionsInput,
175        ::aws_smithy_types::error::operation::BuildError,
176    > {
177        ::std::result::Result::Ok(crate::operation::list_pipeline_executions::ListPipelineExecutionsInput {
178            pipeline_name: self.pipeline_name,
179            created_after: self.created_after,
180            created_before: self.created_before,
181            sort_by: self.sort_by,
182            sort_order: self.sort_order,
183            next_token: self.next_token,
184            max_results: self.max_results,
185        })
186    }
187}