aws_sdk_sagemaker/types/
_data_quality_app_specification.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about the container that a data quality monitoring job runs.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DataQualityAppSpecification {
7    /// <p>The container image that the data quality monitoring job runs.</p>
8    pub image_uri: ::std::option::Option<::std::string::String>,
9    /// <p>The entrypoint for a container used to run a monitoring job.</p>
10    pub container_entrypoint: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
11    /// <p>The arguments to send to the container that the monitoring job runs.</p>
12    pub container_arguments: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
13    /// <p>An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.</p>
14    pub record_preprocessor_source_uri: ::std::option::Option<::std::string::String>,
15    /// <p>An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.</p>
16    pub post_analytics_processor_source_uri: ::std::option::Option<::std::string::String>,
17    /// <p>Sets the environment variables in the container that the monitoring job runs.</p>
18    pub environment: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
19}
20impl DataQualityAppSpecification {
21    /// <p>The container image that the data quality monitoring job runs.</p>
22    pub fn image_uri(&self) -> ::std::option::Option<&str> {
23        self.image_uri.as_deref()
24    }
25    /// <p>The entrypoint for a container used to run a monitoring job.</p>
26    ///
27    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.container_entrypoint.is_none()`.
28    pub fn container_entrypoint(&self) -> &[::std::string::String] {
29        self.container_entrypoint.as_deref().unwrap_or_default()
30    }
31    /// <p>The arguments to send to the container that the monitoring job runs.</p>
32    ///
33    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.container_arguments.is_none()`.
34    pub fn container_arguments(&self) -> &[::std::string::String] {
35        self.container_arguments.as_deref().unwrap_or_default()
36    }
37    /// <p>An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.</p>
38    pub fn record_preprocessor_source_uri(&self) -> ::std::option::Option<&str> {
39        self.record_preprocessor_source_uri.as_deref()
40    }
41    /// <p>An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.</p>
42    pub fn post_analytics_processor_source_uri(&self) -> ::std::option::Option<&str> {
43        self.post_analytics_processor_source_uri.as_deref()
44    }
45    /// <p>Sets the environment variables in the container that the monitoring job runs.</p>
46    pub fn environment(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
47        self.environment.as_ref()
48    }
49}
50impl DataQualityAppSpecification {
51    /// Creates a new builder-style object to manufacture [`DataQualityAppSpecification`](crate::types::DataQualityAppSpecification).
52    pub fn builder() -> crate::types::builders::DataQualityAppSpecificationBuilder {
53        crate::types::builders::DataQualityAppSpecificationBuilder::default()
54    }
55}
56
57/// A builder for [`DataQualityAppSpecification`](crate::types::DataQualityAppSpecification).
58#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
59#[non_exhaustive]
60pub struct DataQualityAppSpecificationBuilder {
61    pub(crate) image_uri: ::std::option::Option<::std::string::String>,
62    pub(crate) container_entrypoint: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
63    pub(crate) container_arguments: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
64    pub(crate) record_preprocessor_source_uri: ::std::option::Option<::std::string::String>,
65    pub(crate) post_analytics_processor_source_uri: ::std::option::Option<::std::string::String>,
66    pub(crate) environment: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
67}
68impl DataQualityAppSpecificationBuilder {
69    /// <p>The container image that the data quality monitoring job runs.</p>
70    /// This field is required.
71    pub fn image_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72        self.image_uri = ::std::option::Option::Some(input.into());
73        self
74    }
75    /// <p>The container image that the data quality monitoring job runs.</p>
76    pub fn set_image_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77        self.image_uri = input;
78        self
79    }
80    /// <p>The container image that the data quality monitoring job runs.</p>
81    pub fn get_image_uri(&self) -> &::std::option::Option<::std::string::String> {
82        &self.image_uri
83    }
84    /// Appends an item to `container_entrypoint`.
85    ///
86    /// To override the contents of this collection use [`set_container_entrypoint`](Self::set_container_entrypoint).
87    ///
88    /// <p>The entrypoint for a container used to run a monitoring job.</p>
89    pub fn container_entrypoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        let mut v = self.container_entrypoint.unwrap_or_default();
91        v.push(input.into());
92        self.container_entrypoint = ::std::option::Option::Some(v);
93        self
94    }
95    /// <p>The entrypoint for a container used to run a monitoring job.</p>
96    pub fn set_container_entrypoint(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
97        self.container_entrypoint = input;
98        self
99    }
100    /// <p>The entrypoint for a container used to run a monitoring job.</p>
101    pub fn get_container_entrypoint(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
102        &self.container_entrypoint
103    }
104    /// Appends an item to `container_arguments`.
105    ///
106    /// To override the contents of this collection use [`set_container_arguments`](Self::set_container_arguments).
107    ///
108    /// <p>The arguments to send to the container that the monitoring job runs.</p>
109    pub fn container_arguments(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        let mut v = self.container_arguments.unwrap_or_default();
111        v.push(input.into());
112        self.container_arguments = ::std::option::Option::Some(v);
113        self
114    }
115    /// <p>The arguments to send to the container that the monitoring job runs.</p>
116    pub fn set_container_arguments(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
117        self.container_arguments = input;
118        self
119    }
120    /// <p>The arguments to send to the container that the monitoring job runs.</p>
121    pub fn get_container_arguments(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
122        &self.container_arguments
123    }
124    /// <p>An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.</p>
125    pub fn record_preprocessor_source_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.record_preprocessor_source_uri = ::std::option::Option::Some(input.into());
127        self
128    }
129    /// <p>An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.</p>
130    pub fn set_record_preprocessor_source_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.record_preprocessor_source_uri = input;
132        self
133    }
134    /// <p>An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.</p>
135    pub fn get_record_preprocessor_source_uri(&self) -> &::std::option::Option<::std::string::String> {
136        &self.record_preprocessor_source_uri
137    }
138    /// <p>An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.</p>
139    pub fn post_analytics_processor_source_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.post_analytics_processor_source_uri = ::std::option::Option::Some(input.into());
141        self
142    }
143    /// <p>An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.</p>
144    pub fn set_post_analytics_processor_source_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.post_analytics_processor_source_uri = input;
146        self
147    }
148    /// <p>An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.</p>
149    pub fn get_post_analytics_processor_source_uri(&self) -> &::std::option::Option<::std::string::String> {
150        &self.post_analytics_processor_source_uri
151    }
152    /// Adds a key-value pair to `environment`.
153    ///
154    /// To override the contents of this collection use [`set_environment`](Self::set_environment).
155    ///
156    /// <p>Sets the environment variables in the container that the monitoring job runs.</p>
157    pub fn environment(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
158        let mut hash_map = self.environment.unwrap_or_default();
159        hash_map.insert(k.into(), v.into());
160        self.environment = ::std::option::Option::Some(hash_map);
161        self
162    }
163    /// <p>Sets the environment variables in the container that the monitoring job runs.</p>
164    pub fn set_environment(
165        mut self,
166        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
167    ) -> Self {
168        self.environment = input;
169        self
170    }
171    /// <p>Sets the environment variables in the container that the monitoring job runs.</p>
172    pub fn get_environment(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
173        &self.environment
174    }
175    /// Consumes the builder and constructs a [`DataQualityAppSpecification`](crate::types::DataQualityAppSpecification).
176    pub fn build(self) -> crate::types::DataQualityAppSpecification {
177        crate::types::DataQualityAppSpecification {
178            image_uri: self.image_uri,
179            container_entrypoint: self.container_entrypoint,
180            container_arguments: self.container_arguments,
181            record_preprocessor_source_uri: self.record_preprocessor_source_uri,
182            post_analytics_processor_source_uri: self.post_analytics_processor_source_uri,
183            environment: self.environment,
184        }
185    }
186}