aws_sdk_sagemaker/operation/query_lineage/_query_lineage_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 QueryLineageInput {
6 /// <p>A list of resource Amazon Resource Name (ARN) that represent the starting point for your lineage query.</p>
7 pub start_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8 /// <p>Associations between lineage entities have a direction. This parameter determines the direction from the StartArn(s) that the query traverses.</p>
9 pub direction: ::std::option::Option<crate::types::Direction>,
10 /// <p>Setting this value to <code>True</code> retrieves not only the entities of interest but also the <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking-entities.html">Associations</a> and lineage entities on the path. Set to <code>False</code> to only return lineage entities that match your query.</p>
11 pub include_edges: ::std::option::Option<bool>,
12 /// <p>A set of filtering parameters that allow you to specify which entities should be returned.</p>
13 /// <ul>
14 /// <li>
15 /// <p>Properties - Key-value pairs to match on the lineage entities' properties.</p></li>
16 /// <li>
17 /// <p>LineageTypes - A set of lineage entity types to match on. For example: <code>TrialComponent</code>, <code>Artifact</code>, or <code>Context</code>.</p></li>
18 /// <li>
19 /// <p>CreatedBefore - Filter entities created before this date.</p></li>
20 /// <li>
21 /// <p>ModifiedBefore - Filter entities modified before this date.</p></li>
22 /// <li>
23 /// <p>ModifiedAfter - Filter entities modified after this date.</p></li>
24 /// </ul>
25 pub filters: ::std::option::Option<crate::types::QueryFilters>,
26 /// <p>The maximum depth in lineage relationships from the <code>StartArns</code> that are traversed. Depth is a measure of the number of <code>Associations</code> from the <code>StartArn</code> entity to the matched results.</p>
27 pub max_depth: ::std::option::Option<i32>,
28 /// <p>Limits the number of vertices in the results. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
29 pub max_results: ::std::option::Option<i32>,
30 /// <p>Limits the number of vertices in the request. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
31 pub next_token: ::std::option::Option<::std::string::String>,
32}
33impl QueryLineageInput {
34 /// <p>A list of resource Amazon Resource Name (ARN) that represent the starting point for your lineage query.</p>
35 ///
36 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.start_arns.is_none()`.
37 pub fn start_arns(&self) -> &[::std::string::String] {
38 self.start_arns.as_deref().unwrap_or_default()
39 }
40 /// <p>Associations between lineage entities have a direction. This parameter determines the direction from the StartArn(s) that the query traverses.</p>
41 pub fn direction(&self) -> ::std::option::Option<&crate::types::Direction> {
42 self.direction.as_ref()
43 }
44 /// <p>Setting this value to <code>True</code> retrieves not only the entities of interest but also the <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking-entities.html">Associations</a> and lineage entities on the path. Set to <code>False</code> to only return lineage entities that match your query.</p>
45 pub fn include_edges(&self) -> ::std::option::Option<bool> {
46 self.include_edges
47 }
48 /// <p>A set of filtering parameters that allow you to specify which entities should be returned.</p>
49 /// <ul>
50 /// <li>
51 /// <p>Properties - Key-value pairs to match on the lineage entities' properties.</p></li>
52 /// <li>
53 /// <p>LineageTypes - A set of lineage entity types to match on. For example: <code>TrialComponent</code>, <code>Artifact</code>, or <code>Context</code>.</p></li>
54 /// <li>
55 /// <p>CreatedBefore - Filter entities created before this date.</p></li>
56 /// <li>
57 /// <p>ModifiedBefore - Filter entities modified before this date.</p></li>
58 /// <li>
59 /// <p>ModifiedAfter - Filter entities modified after this date.</p></li>
60 /// </ul>
61 pub fn filters(&self) -> ::std::option::Option<&crate::types::QueryFilters> {
62 self.filters.as_ref()
63 }
64 /// <p>The maximum depth in lineage relationships from the <code>StartArns</code> that are traversed. Depth is a measure of the number of <code>Associations</code> from the <code>StartArn</code> entity to the matched results.</p>
65 pub fn max_depth(&self) -> ::std::option::Option<i32> {
66 self.max_depth
67 }
68 /// <p>Limits the number of vertices in the results. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
69 pub fn max_results(&self) -> ::std::option::Option<i32> {
70 self.max_results
71 }
72 /// <p>Limits the number of vertices in the request. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
73 pub fn next_token(&self) -> ::std::option::Option<&str> {
74 self.next_token.as_deref()
75 }
76}
77impl QueryLineageInput {
78 /// Creates a new builder-style object to manufacture [`QueryLineageInput`](crate::operation::query_lineage::QueryLineageInput).
79 pub fn builder() -> crate::operation::query_lineage::builders::QueryLineageInputBuilder {
80 crate::operation::query_lineage::builders::QueryLineageInputBuilder::default()
81 }
82}
83
84/// A builder for [`QueryLineageInput`](crate::operation::query_lineage::QueryLineageInput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct QueryLineageInputBuilder {
88 pub(crate) start_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
89 pub(crate) direction: ::std::option::Option<crate::types::Direction>,
90 pub(crate) include_edges: ::std::option::Option<bool>,
91 pub(crate) filters: ::std::option::Option<crate::types::QueryFilters>,
92 pub(crate) max_depth: ::std::option::Option<i32>,
93 pub(crate) max_results: ::std::option::Option<i32>,
94 pub(crate) next_token: ::std::option::Option<::std::string::String>,
95}
96impl QueryLineageInputBuilder {
97 /// Appends an item to `start_arns`.
98 ///
99 /// To override the contents of this collection use [`set_start_arns`](Self::set_start_arns).
100 ///
101 /// <p>A list of resource Amazon Resource Name (ARN) that represent the starting point for your lineage query.</p>
102 pub fn start_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 let mut v = self.start_arns.unwrap_or_default();
104 v.push(input.into());
105 self.start_arns = ::std::option::Option::Some(v);
106 self
107 }
108 /// <p>A list of resource Amazon Resource Name (ARN) that represent the starting point for your lineage query.</p>
109 pub fn set_start_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
110 self.start_arns = input;
111 self
112 }
113 /// <p>A list of resource Amazon Resource Name (ARN) that represent the starting point for your lineage query.</p>
114 pub fn get_start_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
115 &self.start_arns
116 }
117 /// <p>Associations between lineage entities have a direction. This parameter determines the direction from the StartArn(s) that the query traverses.</p>
118 pub fn direction(mut self, input: crate::types::Direction) -> Self {
119 self.direction = ::std::option::Option::Some(input);
120 self
121 }
122 /// <p>Associations between lineage entities have a direction. This parameter determines the direction from the StartArn(s) that the query traverses.</p>
123 pub fn set_direction(mut self, input: ::std::option::Option<crate::types::Direction>) -> Self {
124 self.direction = input;
125 self
126 }
127 /// <p>Associations between lineage entities have a direction. This parameter determines the direction from the StartArn(s) that the query traverses.</p>
128 pub fn get_direction(&self) -> &::std::option::Option<crate::types::Direction> {
129 &self.direction
130 }
131 /// <p>Setting this value to <code>True</code> retrieves not only the entities of interest but also the <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking-entities.html">Associations</a> and lineage entities on the path. Set to <code>False</code> to only return lineage entities that match your query.</p>
132 pub fn include_edges(mut self, input: bool) -> Self {
133 self.include_edges = ::std::option::Option::Some(input);
134 self
135 }
136 /// <p>Setting this value to <code>True</code> retrieves not only the entities of interest but also the <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking-entities.html">Associations</a> and lineage entities on the path. Set to <code>False</code> to only return lineage entities that match your query.</p>
137 pub fn set_include_edges(mut self, input: ::std::option::Option<bool>) -> Self {
138 self.include_edges = input;
139 self
140 }
141 /// <p>Setting this value to <code>True</code> retrieves not only the entities of interest but also the <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking-entities.html">Associations</a> and lineage entities on the path. Set to <code>False</code> to only return lineage entities that match your query.</p>
142 pub fn get_include_edges(&self) -> &::std::option::Option<bool> {
143 &self.include_edges
144 }
145 /// <p>A set of filtering parameters that allow you to specify which entities should be returned.</p>
146 /// <ul>
147 /// <li>
148 /// <p>Properties - Key-value pairs to match on the lineage entities' properties.</p></li>
149 /// <li>
150 /// <p>LineageTypes - A set of lineage entity types to match on. For example: <code>TrialComponent</code>, <code>Artifact</code>, or <code>Context</code>.</p></li>
151 /// <li>
152 /// <p>CreatedBefore - Filter entities created before this date.</p></li>
153 /// <li>
154 /// <p>ModifiedBefore - Filter entities modified before this date.</p></li>
155 /// <li>
156 /// <p>ModifiedAfter - Filter entities modified after this date.</p></li>
157 /// </ul>
158 pub fn filters(mut self, input: crate::types::QueryFilters) -> Self {
159 self.filters = ::std::option::Option::Some(input);
160 self
161 }
162 /// <p>A set of filtering parameters that allow you to specify which entities should be returned.</p>
163 /// <ul>
164 /// <li>
165 /// <p>Properties - Key-value pairs to match on the lineage entities' properties.</p></li>
166 /// <li>
167 /// <p>LineageTypes - A set of lineage entity types to match on. For example: <code>TrialComponent</code>, <code>Artifact</code>, or <code>Context</code>.</p></li>
168 /// <li>
169 /// <p>CreatedBefore - Filter entities created before this date.</p></li>
170 /// <li>
171 /// <p>ModifiedBefore - Filter entities modified before this date.</p></li>
172 /// <li>
173 /// <p>ModifiedAfter - Filter entities modified after this date.</p></li>
174 /// </ul>
175 pub fn set_filters(mut self, input: ::std::option::Option<crate::types::QueryFilters>) -> Self {
176 self.filters = input;
177 self
178 }
179 /// <p>A set of filtering parameters that allow you to specify which entities should be returned.</p>
180 /// <ul>
181 /// <li>
182 /// <p>Properties - Key-value pairs to match on the lineage entities' properties.</p></li>
183 /// <li>
184 /// <p>LineageTypes - A set of lineage entity types to match on. For example: <code>TrialComponent</code>, <code>Artifact</code>, or <code>Context</code>.</p></li>
185 /// <li>
186 /// <p>CreatedBefore - Filter entities created before this date.</p></li>
187 /// <li>
188 /// <p>ModifiedBefore - Filter entities modified before this date.</p></li>
189 /// <li>
190 /// <p>ModifiedAfter - Filter entities modified after this date.</p></li>
191 /// </ul>
192 pub fn get_filters(&self) -> &::std::option::Option<crate::types::QueryFilters> {
193 &self.filters
194 }
195 /// <p>The maximum depth in lineage relationships from the <code>StartArns</code> that are traversed. Depth is a measure of the number of <code>Associations</code> from the <code>StartArn</code> entity to the matched results.</p>
196 pub fn max_depth(mut self, input: i32) -> Self {
197 self.max_depth = ::std::option::Option::Some(input);
198 self
199 }
200 /// <p>The maximum depth in lineage relationships from the <code>StartArns</code> that are traversed. Depth is a measure of the number of <code>Associations</code> from the <code>StartArn</code> entity to the matched results.</p>
201 pub fn set_max_depth(mut self, input: ::std::option::Option<i32>) -> Self {
202 self.max_depth = input;
203 self
204 }
205 /// <p>The maximum depth in lineage relationships from the <code>StartArns</code> that are traversed. Depth is a measure of the number of <code>Associations</code> from the <code>StartArn</code> entity to the matched results.</p>
206 pub fn get_max_depth(&self) -> &::std::option::Option<i32> {
207 &self.max_depth
208 }
209 /// <p>Limits the number of vertices in the results. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
210 pub fn max_results(mut self, input: i32) -> Self {
211 self.max_results = ::std::option::Option::Some(input);
212 self
213 }
214 /// <p>Limits the number of vertices in the results. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
215 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
216 self.max_results = input;
217 self
218 }
219 /// <p>Limits the number of vertices in the results. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
220 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
221 &self.max_results
222 }
223 /// <p>Limits the number of vertices in the request. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
224 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225 self.next_token = ::std::option::Option::Some(input.into());
226 self
227 }
228 /// <p>Limits the number of vertices in the request. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
229 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230 self.next_token = input;
231 self
232 }
233 /// <p>Limits the number of vertices in the request. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
234 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
235 &self.next_token
236 }
237 /// Consumes the builder and constructs a [`QueryLineageInput`](crate::operation::query_lineage::QueryLineageInput).
238 pub fn build(
239 self,
240 ) -> ::std::result::Result<crate::operation::query_lineage::QueryLineageInput, ::aws_smithy_types::error::operation::BuildError> {
241 ::std::result::Result::Ok(crate::operation::query_lineage::QueryLineageInput {
242 start_arns: self.start_arns,
243 direction: self.direction,
244 include_edges: self.include_edges,
245 filters: self.filters,
246 max_depth: self.max_depth,
247 max_results: self.max_results,
248 next_token: self.next_token,
249 })
250 }
251}