aws_sdk_sagemaker/operation/query_lineage/
_query_lineage_output.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 QueryLineageOutput {
6    /// <p>A list of vertices connected to the start entity(ies) in the lineage graph.</p>
7    pub vertices: ::std::option::Option<::std::vec::Vec<crate::types::Vertex>>,
8    /// <p>A list of edges that connect vertices in the response.</p>
9    pub edges: ::std::option::Option<::std::vec::Vec<crate::types::Edge>>,
10    /// <p>Limits the number of vertices in the response. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl QueryLineageOutput {
15    /// <p>A list of vertices connected to the start entity(ies) in the lineage graph.</p>
16    ///
17    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vertices.is_none()`.
18    pub fn vertices(&self) -> &[crate::types::Vertex] {
19        self.vertices.as_deref().unwrap_or_default()
20    }
21    /// <p>A list of edges that connect vertices in the response.</p>
22    ///
23    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.edges.is_none()`.
24    pub fn edges(&self) -> &[crate::types::Edge] {
25        self.edges.as_deref().unwrap_or_default()
26    }
27    /// <p>Limits the number of vertices in the response. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
28    pub fn next_token(&self) -> ::std::option::Option<&str> {
29        self.next_token.as_deref()
30    }
31}
32impl ::aws_types::request_id::RequestId for QueryLineageOutput {
33    fn request_id(&self) -> Option<&str> {
34        self._request_id.as_deref()
35    }
36}
37impl QueryLineageOutput {
38    /// Creates a new builder-style object to manufacture [`QueryLineageOutput`](crate::operation::query_lineage::QueryLineageOutput).
39    pub fn builder() -> crate::operation::query_lineage::builders::QueryLineageOutputBuilder {
40        crate::operation::query_lineage::builders::QueryLineageOutputBuilder::default()
41    }
42}
43
44/// A builder for [`QueryLineageOutput`](crate::operation::query_lineage::QueryLineageOutput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct QueryLineageOutputBuilder {
48    pub(crate) vertices: ::std::option::Option<::std::vec::Vec<crate::types::Vertex>>,
49    pub(crate) edges: ::std::option::Option<::std::vec::Vec<crate::types::Edge>>,
50    pub(crate) next_token: ::std::option::Option<::std::string::String>,
51    _request_id: Option<String>,
52}
53impl QueryLineageOutputBuilder {
54    /// Appends an item to `vertices`.
55    ///
56    /// To override the contents of this collection use [`set_vertices`](Self::set_vertices).
57    ///
58    /// <p>A list of vertices connected to the start entity(ies) in the lineage graph.</p>
59    pub fn vertices(mut self, input: crate::types::Vertex) -> Self {
60        let mut v = self.vertices.unwrap_or_default();
61        v.push(input);
62        self.vertices = ::std::option::Option::Some(v);
63        self
64    }
65    /// <p>A list of vertices connected to the start entity(ies) in the lineage graph.</p>
66    pub fn set_vertices(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Vertex>>) -> Self {
67        self.vertices = input;
68        self
69    }
70    /// <p>A list of vertices connected to the start entity(ies) in the lineage graph.</p>
71    pub fn get_vertices(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Vertex>> {
72        &self.vertices
73    }
74    /// Appends an item to `edges`.
75    ///
76    /// To override the contents of this collection use [`set_edges`](Self::set_edges).
77    ///
78    /// <p>A list of edges that connect vertices in the response.</p>
79    pub fn edges(mut self, input: crate::types::Edge) -> Self {
80        let mut v = self.edges.unwrap_or_default();
81        v.push(input);
82        self.edges = ::std::option::Option::Some(v);
83        self
84    }
85    /// <p>A list of edges that connect vertices in the response.</p>
86    pub fn set_edges(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Edge>>) -> Self {
87        self.edges = input;
88        self
89    }
90    /// <p>A list of edges that connect vertices in the response.</p>
91    pub fn get_edges(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Edge>> {
92        &self.edges
93    }
94    /// <p>Limits the number of vertices in the response. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</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>Limits the number of vertices in the response. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</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>Limits the number of vertices in the response. Use the <code>NextToken</code> in a response to to retrieve the next page of results.</p>
105    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
106        &self.next_token
107    }
108    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
109        self._request_id = Some(request_id.into());
110        self
111    }
112
113    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
114        self._request_id = request_id;
115        self
116    }
117    /// Consumes the builder and constructs a [`QueryLineageOutput`](crate::operation::query_lineage::QueryLineageOutput).
118    pub fn build(self) -> crate::operation::query_lineage::QueryLineageOutput {
119        crate::operation::query_lineage::QueryLineageOutput {
120            vertices: self.vertices,
121            edges: self.edges,
122            next_token: self.next_token,
123            _request_id: self._request_id,
124        }
125    }
126}