aws_sdk_machinelearning/operation/describe_evaluations/
_describe_evaluations_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeEvaluationsOutput {
7 pub results: ::std::option::Option<::std::vec::Vec<crate::types::Evaluation>>,
9 pub next_token: ::std::option::Option<::std::string::String>,
11 _request_id: Option<String>,
12}
13impl DescribeEvaluationsOutput {
14 pub fn results(&self) -> &[crate::types::Evaluation] {
18 self.results.as_deref().unwrap_or_default()
19 }
20 pub fn next_token(&self) -> ::std::option::Option<&str> {
22 self.next_token.as_deref()
23 }
24}
25impl ::aws_types::request_id::RequestId for DescribeEvaluationsOutput {
26 fn request_id(&self) -> Option<&str> {
27 self._request_id.as_deref()
28 }
29}
30impl DescribeEvaluationsOutput {
31 pub fn builder() -> crate::operation::describe_evaluations::builders::DescribeEvaluationsOutputBuilder {
33 crate::operation::describe_evaluations::builders::DescribeEvaluationsOutputBuilder::default()
34 }
35}
36
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct DescribeEvaluationsOutputBuilder {
41 pub(crate) results: ::std::option::Option<::std::vec::Vec<crate::types::Evaluation>>,
42 pub(crate) next_token: ::std::option::Option<::std::string::String>,
43 _request_id: Option<String>,
44}
45impl DescribeEvaluationsOutputBuilder {
46 pub fn results(mut self, input: crate::types::Evaluation) -> Self {
52 let mut v = self.results.unwrap_or_default();
53 v.push(input);
54 self.results = ::std::option::Option::Some(v);
55 self
56 }
57 pub fn set_results(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Evaluation>>) -> Self {
59 self.results = input;
60 self
61 }
62 pub fn get_results(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Evaluation>> {
64 &self.results
65 }
66 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.next_token = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.next_token = input;
74 self
75 }
76 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
78 &self.next_token
79 }
80 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
81 self._request_id = Some(request_id.into());
82 self
83 }
84
85 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
86 self._request_id = request_id;
87 self
88 }
89 pub fn build(self) -> crate::operation::describe_evaluations::DescribeEvaluationsOutput {
91 crate::operation::describe_evaluations::DescribeEvaluationsOutput {
92 results: self.results,
93 next_token: self.next_token,
94 _request_id: self._request_id,
95 }
96 }
97}