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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The performance metrics data points for Transaction Fraud Insights (TFI) model.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TfiMetricDataPoint {
    /// <p>The false positive rate. This is the percentage of total legitimate events that are incorrectly predicted as fraud.</p>
    pub fpr: ::std::option::Option<f32>,
    /// <p>The percentage of fraud events correctly predicted as fraudulent as compared to all events predicted as fraudulent.</p>
    pub precision: ::std::option::Option<f32>,
    /// <p>The true positive rate. This is the percentage of total fraud the model detects. Also known as capture rate.</p>
    pub tpr: ::std::option::Option<f32>,
    /// <p>The model threshold that specifies an acceptable fraud capture rate. For example, a threshold of 500 means any model score 500 or above is labeled as fraud.</p>
    pub threshold: ::std::option::Option<f32>,
}
impl TfiMetricDataPoint {
    /// <p>The false positive rate. This is the percentage of total legitimate events that are incorrectly predicted as fraud.</p>
    pub fn fpr(&self) -> ::std::option::Option<f32> {
        self.fpr
    }
    /// <p>The percentage of fraud events correctly predicted as fraudulent as compared to all events predicted as fraudulent.</p>
    pub fn precision(&self) -> ::std::option::Option<f32> {
        self.precision
    }
    /// <p>The true positive rate. This is the percentage of total fraud the model detects. Also known as capture rate.</p>
    pub fn tpr(&self) -> ::std::option::Option<f32> {
        self.tpr
    }
    /// <p>The model threshold that specifies an acceptable fraud capture rate. For example, a threshold of 500 means any model score 500 or above is labeled as fraud.</p>
    pub fn threshold(&self) -> ::std::option::Option<f32> {
        self.threshold
    }
}
impl TfiMetricDataPoint {
    /// Creates a new builder-style object to manufacture [`TfiMetricDataPoint`](crate::types::TfiMetricDataPoint).
    pub fn builder() -> crate::types::builders::TfiMetricDataPointBuilder {
        crate::types::builders::TfiMetricDataPointBuilder::default()
    }
}

/// A builder for [`TfiMetricDataPoint`](crate::types::TfiMetricDataPoint).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TfiMetricDataPointBuilder {
    pub(crate) fpr: ::std::option::Option<f32>,
    pub(crate) precision: ::std::option::Option<f32>,
    pub(crate) tpr: ::std::option::Option<f32>,
    pub(crate) threshold: ::std::option::Option<f32>,
}
impl TfiMetricDataPointBuilder {
    /// <p>The false positive rate. This is the percentage of total legitimate events that are incorrectly predicted as fraud.</p>
    pub fn fpr(mut self, input: f32) -> Self {
        self.fpr = ::std::option::Option::Some(input);
        self
    }
    /// <p>The false positive rate. This is the percentage of total legitimate events that are incorrectly predicted as fraud.</p>
    pub fn set_fpr(mut self, input: ::std::option::Option<f32>) -> Self {
        self.fpr = input;
        self
    }
    /// <p>The false positive rate. This is the percentage of total legitimate events that are incorrectly predicted as fraud.</p>
    pub fn get_fpr(&self) -> &::std::option::Option<f32> {
        &self.fpr
    }
    /// <p>The percentage of fraud events correctly predicted as fraudulent as compared to all events predicted as fraudulent.</p>
    pub fn precision(mut self, input: f32) -> Self {
        self.precision = ::std::option::Option::Some(input);
        self
    }
    /// <p>The percentage of fraud events correctly predicted as fraudulent as compared to all events predicted as fraudulent.</p>
    pub fn set_precision(mut self, input: ::std::option::Option<f32>) -> Self {
        self.precision = input;
        self
    }
    /// <p>The percentage of fraud events correctly predicted as fraudulent as compared to all events predicted as fraudulent.</p>
    pub fn get_precision(&self) -> &::std::option::Option<f32> {
        &self.precision
    }
    /// <p>The true positive rate. This is the percentage of total fraud the model detects. Also known as capture rate.</p>
    pub fn tpr(mut self, input: f32) -> Self {
        self.tpr = ::std::option::Option::Some(input);
        self
    }
    /// <p>The true positive rate. This is the percentage of total fraud the model detects. Also known as capture rate.</p>
    pub fn set_tpr(mut self, input: ::std::option::Option<f32>) -> Self {
        self.tpr = input;
        self
    }
    /// <p>The true positive rate. This is the percentage of total fraud the model detects. Also known as capture rate.</p>
    pub fn get_tpr(&self) -> &::std::option::Option<f32> {
        &self.tpr
    }
    /// <p>The model threshold that specifies an acceptable fraud capture rate. For example, a threshold of 500 means any model score 500 or above is labeled as fraud.</p>
    pub fn threshold(mut self, input: f32) -> Self {
        self.threshold = ::std::option::Option::Some(input);
        self
    }
    /// <p>The model threshold that specifies an acceptable fraud capture rate. For example, a threshold of 500 means any model score 500 or above is labeled as fraud.</p>
    pub fn set_threshold(mut self, input: ::std::option::Option<f32>) -> Self {
        self.threshold = input;
        self
    }
    /// <p>The model threshold that specifies an acceptable fraud capture rate. For example, a threshold of 500 means any model score 500 or above is labeled as fraud.</p>
    pub fn get_threshold(&self) -> &::std::option::Option<f32> {
        &self.threshold
    }
    /// Consumes the builder and constructs a [`TfiMetricDataPoint`](crate::types::TfiMetricDataPoint).
    pub fn build(self) -> crate::types::TfiMetricDataPoint {
        crate::types::TfiMetricDataPoint {
            fpr: self.fpr,
            precision: self.precision,
            tpr: self.tpr,
            threshold: self.threshold,
        }
    }
}