1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/sagemaker/SageMaker_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/DateTime.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace SageMaker
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>The name, value, and date and time of a metric that was emitted to Amazon
29    * CloudWatch.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/MetricData">AWS
31    * API Reference</a></p>
32    */
33   class AWS_SAGEMAKER_API MetricData
34   {
35   public:
36     MetricData();
37     MetricData(Aws::Utils::Json::JsonView jsonValue);
38     MetricData& operator=(Aws::Utils::Json::JsonView jsonValue);
39     Aws::Utils::Json::JsonValue Jsonize() const;
40 
41 
42     /**
43      * <p>The name of the metric.</p>
44      */
GetMetricName()45     inline const Aws::String& GetMetricName() const{ return m_metricName; }
46 
47     /**
48      * <p>The name of the metric.</p>
49      */
MetricNameHasBeenSet()50     inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
51 
52     /**
53      * <p>The name of the metric.</p>
54      */
SetMetricName(const Aws::String & value)55     inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
56 
57     /**
58      * <p>The name of the metric.</p>
59      */
SetMetricName(Aws::String && value)60     inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
61 
62     /**
63      * <p>The name of the metric.</p>
64      */
SetMetricName(const char * value)65     inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
66 
67     /**
68      * <p>The name of the metric.</p>
69      */
WithMetricName(const Aws::String & value)70     inline MetricData& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
71 
72     /**
73      * <p>The name of the metric.</p>
74      */
WithMetricName(Aws::String && value)75     inline MetricData& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}
76 
77     /**
78      * <p>The name of the metric.</p>
79      */
WithMetricName(const char * value)80     inline MetricData& WithMetricName(const char* value) { SetMetricName(value); return *this;}
81 
82 
83     /**
84      * <p>The value of the metric.</p>
85      */
GetValue()86     inline double GetValue() const{ return m_value; }
87 
88     /**
89      * <p>The value of the metric.</p>
90      */
ValueHasBeenSet()91     inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
92 
93     /**
94      * <p>The value of the metric.</p>
95      */
SetValue(double value)96     inline void SetValue(double value) { m_valueHasBeenSet = true; m_value = value; }
97 
98     /**
99      * <p>The value of the metric.</p>
100      */
WithValue(double value)101     inline MetricData& WithValue(double value) { SetValue(value); return *this;}
102 
103 
104     /**
105      * <p>The date and time that the algorithm emitted the metric.</p>
106      */
GetTimestamp()107     inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; }
108 
109     /**
110      * <p>The date and time that the algorithm emitted the metric.</p>
111      */
TimestampHasBeenSet()112     inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
113 
114     /**
115      * <p>The date and time that the algorithm emitted the metric.</p>
116      */
SetTimestamp(const Aws::Utils::DateTime & value)117     inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; }
118 
119     /**
120      * <p>The date and time that the algorithm emitted the metric.</p>
121      */
SetTimestamp(Aws::Utils::DateTime && value)122     inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); }
123 
124     /**
125      * <p>The date and time that the algorithm emitted the metric.</p>
126      */
WithTimestamp(const Aws::Utils::DateTime & value)127     inline MetricData& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;}
128 
129     /**
130      * <p>The date and time that the algorithm emitted the metric.</p>
131      */
WithTimestamp(Aws::Utils::DateTime && value)132     inline MetricData& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;}
133 
134   private:
135 
136     Aws::String m_metricName;
137     bool m_metricNameHasBeenSet;
138 
139     double m_value;
140     bool m_valueHasBeenSet;
141 
142     Aws::Utils::DateTime m_timestamp;
143     bool m_timestampHasBeenSet;
144   };
145 
146 } // namespace Model
147 } // namespace SageMaker
148 } // namespace Aws
149