Skip to main content

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