aws_sdk_machinelearning/operation/create_evaluation/
_create_evaluation_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 CreateEvaluationInput {
6    /// <p>A user-supplied ID that uniquely identifies the <code>Evaluation</code>.</p>
7    pub evaluation_id: ::std::option::Option<::std::string::String>,
8    /// <p>A user-supplied name or description of the <code>Evaluation</code>.</p>
9    pub evaluation_name: ::std::option::Option<::std::string::String>,
10    /// <p>The ID of the <code>MLModel</code> to evaluate.</p>
11    /// <p>The schema used in creating the <code>MLModel</code> must match the schema of the <code>DataSource</code> used in the <code>Evaluation</code>.</p>
12    pub ml_model_id: ::std::option::Option<::std::string::String>,
13    /// <p>The ID of the <code>DataSource</code> for the evaluation. The schema of the <code>DataSource</code> must match the schema used to create the <code>MLModel</code>.</p>
14    pub evaluation_data_source_id: ::std::option::Option<::std::string::String>,
15}
16impl CreateEvaluationInput {
17    /// <p>A user-supplied ID that uniquely identifies the <code>Evaluation</code>.</p>
18    pub fn evaluation_id(&self) -> ::std::option::Option<&str> {
19        self.evaluation_id.as_deref()
20    }
21    /// <p>A user-supplied name or description of the <code>Evaluation</code>.</p>
22    pub fn evaluation_name(&self) -> ::std::option::Option<&str> {
23        self.evaluation_name.as_deref()
24    }
25    /// <p>The ID of the <code>MLModel</code> to evaluate.</p>
26    /// <p>The schema used in creating the <code>MLModel</code> must match the schema of the <code>DataSource</code> used in the <code>Evaluation</code>.</p>
27    pub fn ml_model_id(&self) -> ::std::option::Option<&str> {
28        self.ml_model_id.as_deref()
29    }
30    /// <p>The ID of the <code>DataSource</code> for the evaluation. The schema of the <code>DataSource</code> must match the schema used to create the <code>MLModel</code>.</p>
31    pub fn evaluation_data_source_id(&self) -> ::std::option::Option<&str> {
32        self.evaluation_data_source_id.as_deref()
33    }
34}
35impl CreateEvaluationInput {
36    /// Creates a new builder-style object to manufacture [`CreateEvaluationInput`](crate::operation::create_evaluation::CreateEvaluationInput).
37    pub fn builder() -> crate::operation::create_evaluation::builders::CreateEvaluationInputBuilder {
38        crate::operation::create_evaluation::builders::CreateEvaluationInputBuilder::default()
39    }
40}
41
42/// A builder for [`CreateEvaluationInput`](crate::operation::create_evaluation::CreateEvaluationInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct CreateEvaluationInputBuilder {
46    pub(crate) evaluation_id: ::std::option::Option<::std::string::String>,
47    pub(crate) evaluation_name: ::std::option::Option<::std::string::String>,
48    pub(crate) ml_model_id: ::std::option::Option<::std::string::String>,
49    pub(crate) evaluation_data_source_id: ::std::option::Option<::std::string::String>,
50}
51impl CreateEvaluationInputBuilder {
52    /// <p>A user-supplied ID that uniquely identifies the <code>Evaluation</code>.</p>
53    /// This field is required.
54    pub fn evaluation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.evaluation_id = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>A user-supplied ID that uniquely identifies the <code>Evaluation</code>.</p>
59    pub fn set_evaluation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.evaluation_id = input;
61        self
62    }
63    /// <p>A user-supplied ID that uniquely identifies the <code>Evaluation</code>.</p>
64    pub fn get_evaluation_id(&self) -> &::std::option::Option<::std::string::String> {
65        &self.evaluation_id
66    }
67    /// <p>A user-supplied name or description of the <code>Evaluation</code>.</p>
68    pub fn evaluation_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.evaluation_name = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>A user-supplied name or description of the <code>Evaluation</code>.</p>
73    pub fn set_evaluation_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.evaluation_name = input;
75        self
76    }
77    /// <p>A user-supplied name or description of the <code>Evaluation</code>.</p>
78    pub fn get_evaluation_name(&self) -> &::std::option::Option<::std::string::String> {
79        &self.evaluation_name
80    }
81    /// <p>The ID of the <code>MLModel</code> to evaluate.</p>
82    /// <p>The schema used in creating the <code>MLModel</code> must match the schema of the <code>DataSource</code> used in the <code>Evaluation</code>.</p>
83    /// This field is required.
84    pub fn ml_model_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.ml_model_id = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>The ID of the <code>MLModel</code> to evaluate.</p>
89    /// <p>The schema used in creating the <code>MLModel</code> must match the schema of the <code>DataSource</code> used in the <code>Evaluation</code>.</p>
90    pub fn set_ml_model_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.ml_model_id = input;
92        self
93    }
94    /// <p>The ID of the <code>MLModel</code> to evaluate.</p>
95    /// <p>The schema used in creating the <code>MLModel</code> must match the schema of the <code>DataSource</code> used in the <code>Evaluation</code>.</p>
96    pub fn get_ml_model_id(&self) -> &::std::option::Option<::std::string::String> {
97        &self.ml_model_id
98    }
99    /// <p>The ID of the <code>DataSource</code> for the evaluation. The schema of the <code>DataSource</code> must match the schema used to create the <code>MLModel</code>.</p>
100    /// This field is required.
101    pub fn evaluation_data_source_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.evaluation_data_source_id = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The ID of the <code>DataSource</code> for the evaluation. The schema of the <code>DataSource</code> must match the schema used to create the <code>MLModel</code>.</p>
106    pub fn set_evaluation_data_source_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.evaluation_data_source_id = input;
108        self
109    }
110    /// <p>The ID of the <code>DataSource</code> for the evaluation. The schema of the <code>DataSource</code> must match the schema used to create the <code>MLModel</code>.</p>
111    pub fn get_evaluation_data_source_id(&self) -> &::std::option::Option<::std::string::String> {
112        &self.evaluation_data_source_id
113    }
114    /// Consumes the builder and constructs a [`CreateEvaluationInput`](crate::operation::create_evaluation::CreateEvaluationInput).
115    pub fn build(
116        self,
117    ) -> ::std::result::Result<crate::operation::create_evaluation::CreateEvaluationInput, ::aws_smithy_types::error::operation::BuildError> {
118        ::std::result::Result::Ok(crate::operation::create_evaluation::CreateEvaluationInput {
119            evaluation_id: self.evaluation_id,
120            evaluation_name: self.evaluation_name,
121            ml_model_id: self.ml_model_id,
122            evaluation_data_source_id: self.evaluation_data_source_id,
123        })
124    }
125}