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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A specification for a predefined metric.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PredefinedMetricSpecification {
    /// <p>The metric type. You can only apply SageMaker metric types to SageMaker endpoints.</p>
    pub predefined_metric_type: ::std::option::Option<::std::string::String>,
}
impl PredefinedMetricSpecification {
    /// <p>The metric type. You can only apply SageMaker metric types to SageMaker endpoints.</p>
    pub fn predefined_metric_type(&self) -> ::std::option::Option<&str> {
        self.predefined_metric_type.as_deref()
    }
}
impl PredefinedMetricSpecification {
    /// Creates a new builder-style object to manufacture [`PredefinedMetricSpecification`](crate::types::PredefinedMetricSpecification).
    pub fn builder() -> crate::types::builders::PredefinedMetricSpecificationBuilder {
        crate::types::builders::PredefinedMetricSpecificationBuilder::default()
    }
}

/// A builder for [`PredefinedMetricSpecification`](crate::types::PredefinedMetricSpecification).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PredefinedMetricSpecificationBuilder {
    pub(crate) predefined_metric_type: ::std::option::Option<::std::string::String>,
}
impl PredefinedMetricSpecificationBuilder {
    /// <p>The metric type. You can only apply SageMaker metric types to SageMaker endpoints.</p>
    pub fn predefined_metric_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.predefined_metric_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The metric type. You can only apply SageMaker metric types to SageMaker endpoints.</p>
    pub fn set_predefined_metric_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.predefined_metric_type = input;
        self
    }
    /// <p>The metric type. You can only apply SageMaker metric types to SageMaker endpoints.</p>
    pub fn get_predefined_metric_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.predefined_metric_type
    }
    /// Consumes the builder and constructs a [`PredefinedMetricSpecification`](crate::types::PredefinedMetricSpecification).
    pub fn build(self) -> crate::types::PredefinedMetricSpecification {
        crate::types::PredefinedMetricSpecification {
            predefined_metric_type: self.predefined_metric_type,
        }
    }
}