aws_sdk_sagemaker/operation/query_lineage/
_query_lineage_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct QueryLineageOutput {
6    pub vertices: ::std::option::Option<::std::vec::Vec<crate::types::Vertex>>,
8    pub edges: ::std::option::Option<::std::vec::Vec<crate::types::Edge>>,
10    pub next_token: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl QueryLineageOutput {
15    pub fn vertices(&self) -> &[crate::types::Vertex] {
19        self.vertices.as_deref().unwrap_or_default()
20    }
21    pub fn edges(&self) -> &[crate::types::Edge] {
25        self.edges.as_deref().unwrap_or_default()
26    }
27    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    pub fn builder() -> crate::operation::query_lineage::builders::QueryLineageOutputBuilder {
40        crate::operation::query_lineage::builders::QueryLineageOutputBuilder::default()
41    }
42}
43
44#[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    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    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    pub fn get_vertices(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Vertex>> {
72        &self.vertices
73    }
74    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    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    pub fn get_edges(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Edge>> {
92        &self.edges
93    }
94    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    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.next_token = input;
102        self
103    }
104    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    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}