1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains information about the deployment options of a model.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ModelVariantConfig {
    /// <p>The name of the Amazon SageMaker Model entity.</p>
    pub model_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the variant.</p>
    pub variant_name: ::std::option::Option<::std::string::String>,
    /// <p>The configuration for the infrastructure that the model will be deployed to.</p>
    pub infrastructure_config: ::std::option::Option<crate::types::ModelInfrastructureConfig>,
}
impl ModelVariantConfig {
    /// <p>The name of the Amazon SageMaker Model entity.</p>
    pub fn model_name(&self) -> ::std::option::Option<&str> {
        self.model_name.as_deref()
    }
    /// <p>The name of the variant.</p>
    pub fn variant_name(&self) -> ::std::option::Option<&str> {
        self.variant_name.as_deref()
    }
    /// <p>The configuration for the infrastructure that the model will be deployed to.</p>
    pub fn infrastructure_config(&self) -> ::std::option::Option<&crate::types::ModelInfrastructureConfig> {
        self.infrastructure_config.as_ref()
    }
}
impl ModelVariantConfig {
    /// Creates a new builder-style object to manufacture [`ModelVariantConfig`](crate::types::ModelVariantConfig).
    pub fn builder() -> crate::types::builders::ModelVariantConfigBuilder {
        crate::types::builders::ModelVariantConfigBuilder::default()
    }
}

/// A builder for [`ModelVariantConfig`](crate::types::ModelVariantConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ModelVariantConfigBuilder {
    pub(crate) model_name: ::std::option::Option<::std::string::String>,
    pub(crate) variant_name: ::std::option::Option<::std::string::String>,
    pub(crate) infrastructure_config: ::std::option::Option<crate::types::ModelInfrastructureConfig>,
}
impl ModelVariantConfigBuilder {
    /// <p>The name of the Amazon SageMaker Model entity.</p>
    /// This field is required.
    pub fn model_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.model_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Amazon SageMaker Model entity.</p>
    pub fn set_model_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.model_name = input;
        self
    }
    /// <p>The name of the Amazon SageMaker Model entity.</p>
    pub fn get_model_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.model_name
    }
    /// <p>The name of the variant.</p>
    /// This field is required.
    pub fn variant_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.variant_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the variant.</p>
    pub fn set_variant_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.variant_name = input;
        self
    }
    /// <p>The name of the variant.</p>
    pub fn get_variant_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.variant_name
    }
    /// <p>The configuration for the infrastructure that the model will be deployed to.</p>
    /// This field is required.
    pub fn infrastructure_config(mut self, input: crate::types::ModelInfrastructureConfig) -> Self {
        self.infrastructure_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration for the infrastructure that the model will be deployed to.</p>
    pub fn set_infrastructure_config(mut self, input: ::std::option::Option<crate::types::ModelInfrastructureConfig>) -> Self {
        self.infrastructure_config = input;
        self
    }
    /// <p>The configuration for the infrastructure that the model will be deployed to.</p>
    pub fn get_infrastructure_config(&self) -> &::std::option::Option<crate::types::ModelInfrastructureConfig> {
        &self.infrastructure_config
    }
    /// Consumes the builder and constructs a [`ModelVariantConfig`](crate::types::ModelVariantConfig).
    pub fn build(self) -> crate::types::ModelVariantConfig {
        crate::types::ModelVariantConfig {
            model_name: self.model_name,
            variant_name: self.variant_name,
            infrastructure_config: self.infrastructure_config,
        }
    }
}