Skip to main content

aws_sdk_sagemaker/types/
_model_data_source.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Specifies the location of ML model data to deploy. If specified, you must specify one and only one of the available data sources.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ModelDataSource {
7    /// <p>Specifies the S3 location of ML model data to deploy.</p>
8    pub s3_data_source: ::std::option::Option<crate::types::S3ModelDataSource>,
9}
10impl ModelDataSource {
11    /// <p>Specifies the S3 location of ML model data to deploy.</p>
12    pub fn s3_data_source(&self) -> ::std::option::Option<&crate::types::S3ModelDataSource> {
13        self.s3_data_source.as_ref()
14    }
15}
16impl ModelDataSource {
17    /// Creates a new builder-style object to manufacture [`ModelDataSource`](crate::types::ModelDataSource).
18    pub fn builder() -> crate::types::builders::ModelDataSourceBuilder {
19        crate::types::builders::ModelDataSourceBuilder::default()
20    }
21}
22
23/// A builder for [`ModelDataSource`](crate::types::ModelDataSource).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct ModelDataSourceBuilder {
27    pub(crate) s3_data_source: ::std::option::Option<crate::types::S3ModelDataSource>,
28}
29impl ModelDataSourceBuilder {
30    /// <p>Specifies the S3 location of ML model data to deploy.</p>
31    pub fn s3_data_source(mut self, input: crate::types::S3ModelDataSource) -> Self {
32        self.s3_data_source = ::std::option::Option::Some(input);
33        self
34    }
35    /// <p>Specifies the S3 location of ML model data to deploy.</p>
36    pub fn set_s3_data_source(mut self, input: ::std::option::Option<crate::types::S3ModelDataSource>) -> Self {
37        self.s3_data_source = input;
38        self
39    }
40    /// <p>Specifies the S3 location of ML model data to deploy.</p>
41    pub fn get_s3_data_source(&self) -> &::std::option::Option<crate::types::S3ModelDataSource> {
42        &self.s3_data_source
43    }
44    /// Consumes the builder and constructs a [`ModelDataSource`](crate::types::ModelDataSource).
45    pub fn build(self) -> crate::types::ModelDataSource {
46        crate::types::ModelDataSource {
47            s3_data_source: self.s3_data_source,
48        }
49    }
50}