AWS SDK for C++  0.14.3
AWS SDK for C++
Prediction.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Json
26 {
27  class JsonValue;
28 } // namespace Json
29 } // namespace Utils
30 namespace MachineLearning
31 {
32 namespace Model
33 {
34 
48  {
49  public:
50  Prediction();
51  Prediction(const Aws::Utils::Json::JsonValue& jsonValue);
52  Prediction& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
53  Aws::Utils::Json::JsonValue Jsonize() const;
54 
59  inline const Aws::String& GetPredictedLabel() const{ return m_predictedLabel; }
60 
65  inline void SetPredictedLabel(const Aws::String& value) { m_predictedLabelHasBeenSet = true; m_predictedLabel = value; }
66 
71  inline void SetPredictedLabel(Aws::String&& value) { m_predictedLabelHasBeenSet = true; m_predictedLabel = value; }
72 
77  inline void SetPredictedLabel(const char* value) { m_predictedLabelHasBeenSet = true; m_predictedLabel.assign(value); }
78 
83  inline Prediction& WithPredictedLabel(const Aws::String& value) { SetPredictedLabel(value); return *this;}
84 
89  inline Prediction& WithPredictedLabel(Aws::String&& value) { SetPredictedLabel(value); return *this;}
90 
95  inline Prediction& WithPredictedLabel(const char* value) { SetPredictedLabel(value); return *this;}
96 
100  inline double GetPredictedValue() const{ return m_predictedValue; }
101 
105  inline void SetPredictedValue(double value) { m_predictedValueHasBeenSet = true; m_predictedValue = value; }
106 
110  inline Prediction& WithPredictedValue(double value) { SetPredictedValue(value); return *this;}
111 
112 
113  inline const Aws::Map<Aws::String, double>& GetPredictedScores() const{ return m_predictedScores; }
114 
115 
116  inline void SetPredictedScores(const Aws::Map<Aws::String, double>& value) { m_predictedScoresHasBeenSet = true; m_predictedScores = value; }
117 
118 
119  inline void SetPredictedScores(Aws::Map<Aws::String, double>&& value) { m_predictedScoresHasBeenSet = true; m_predictedScores = value; }
120 
121 
122  inline Prediction& WithPredictedScores(const Aws::Map<Aws::String, double>& value) { SetPredictedScores(value); return *this;}
123 
124 
125  inline Prediction& WithPredictedScores(Aws::Map<Aws::String, double>&& value) { SetPredictedScores(value); return *this;}
126 
127 
128  inline Prediction& AddPredictedScores(const Aws::String& key, double value) { m_predictedScoresHasBeenSet = true; m_predictedScores[key] = value; return *this; }
129 
130 
131  inline Prediction& AddPredictedScores(Aws::String&& key, double value) { m_predictedScoresHasBeenSet = true; m_predictedScores[key] = value; return *this; }
132 
133 
134  inline Prediction& AddPredictedScores(const char* key, double value) { m_predictedScoresHasBeenSet = true; m_predictedScores[key] = value; return *this; }
135 
136 
137  inline const Aws::Map<DetailsAttributes, Aws::String>& GetDetails() const{ return m_details; }
138 
139 
140  inline void SetDetails(const Aws::Map<DetailsAttributes, Aws::String>& value) { m_detailsHasBeenSet = true; m_details = value; }
141 
142 
143  inline void SetDetails(Aws::Map<DetailsAttributes, Aws::String>&& value) { m_detailsHasBeenSet = true; m_details = value; }
144 
145 
146  inline Prediction& WithDetails(const Aws::Map<DetailsAttributes, Aws::String>& value) { SetDetails(value); return *this;}
147 
148 
149  inline Prediction& WithDetails(Aws::Map<DetailsAttributes, Aws::String>&& value) { SetDetails(value); return *this;}
150 
151 
152  inline Prediction& AddDetails(const DetailsAttributes& key, const Aws::String& value) { m_detailsHasBeenSet = true; m_details[key] = value; return *this; }
153 
154 
155  inline Prediction& AddDetails(DetailsAttributes&& key, const Aws::String& value) { m_detailsHasBeenSet = true; m_details[key] = value; return *this; }
156 
157 
158  inline Prediction& AddDetails(const DetailsAttributes& key, Aws::String&& value) { m_detailsHasBeenSet = true; m_details[key] = value; return *this; }
159 
160 
161  inline Prediction& AddDetails(DetailsAttributes&& key, Aws::String&& value) { m_detailsHasBeenSet = true; m_details[key] = value; return *this; }
162 
163 
164  inline Prediction& AddDetails(DetailsAttributes&& key, const char* value) { m_detailsHasBeenSet = true; m_details[key] = value; return *this; }
165 
166 
167  inline Prediction& AddDetails(const DetailsAttributes& key, const char* value) { m_detailsHasBeenSet = true; m_details[key] = value; return *this; }
168 
169  private:
170  Aws::String m_predictedLabel;
171  bool m_predictedLabelHasBeenSet;
172  double m_predictedValue;
173  bool m_predictedValueHasBeenSet;
174  Aws::Map<Aws::String, double> m_predictedScores;
175  bool m_predictedScoresHasBeenSet;
177  bool m_detailsHasBeenSet;
178  };
179 
180 } // namespace Model
181 } // namespace MachineLearning
182 } // namespace Aws
const Aws::Map< Aws::String, double > & GetPredictedScores() const
Definition: Prediction.h:113
Prediction & WithPredictedScores(const Aws::Map< Aws::String, double > &value)
Definition: Prediction.h:122
Prediction & WithPredictedLabel(const Aws::String &value)
Definition: Prediction.h:83
void SetPredictedScores(const Aws::Map< Aws::String, double > &value)
Definition: Prediction.h:116
void SetPredictedLabel(const Aws::String &value)
Definition: Prediction.h:65
void SetPredictedLabel(const char *value)
Definition: Prediction.h:77
Prediction & WithDetails(Aws::Map< DetailsAttributes, Aws::String > &&value)
Definition: Prediction.h:149
Prediction & AddDetails(const DetailsAttributes &key, const Aws::String &value)
Definition: Prediction.h:152
Prediction & WithPredictedScores(Aws::Map< Aws::String, double > &&value)
Definition: Prediction.h:125
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
Prediction & AddDetails(const DetailsAttributes &key, const char *value)
Definition: Prediction.h:167
Prediction & AddDetails(DetailsAttributes &&key, const Aws::String &value)
Definition: Prediction.h:155
void SetPredictedLabel(Aws::String &&value)
Definition: Prediction.h:71
Prediction & AddDetails(DetailsAttributes &&key, const char *value)
Definition: Prediction.h:164
Prediction & WithPredictedLabel(const char *value)
Definition: Prediction.h:95
Prediction & AddDetails(DetailsAttributes &&key, Aws::String &&value)
Definition: Prediction.h:161
Prediction & AddPredictedScores(Aws::String &&key, double value)
Definition: Prediction.h:131
Prediction & WithPredictedValue(double value)
Definition: Prediction.h:110
const Aws::String & GetPredictedLabel() const
Definition: Prediction.h:59
const Aws::Map< DetailsAttributes, Aws::String > & GetDetails() const
Definition: Prediction.h:137
Prediction & WithDetails(const Aws::Map< DetailsAttributes, Aws::String > &value)
Definition: Prediction.h:146
Prediction & AddDetails(const DetailsAttributes &key, Aws::String &&value)
Definition: Prediction.h:158
Prediction & AddPredictedScores(const char *key, double value)
Definition: Prediction.h:134
Prediction & WithPredictedLabel(Aws::String &&value)
Definition: Prediction.h:89
void SetDetails(Aws::Map< DetailsAttributes, Aws::String > &&value)
Definition: Prediction.h:143
void SetDetails(const Aws::Map< DetailsAttributes, Aws::String > &value)
Definition: Prediction.h:140
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Prediction & AddPredictedScores(const Aws::String &key, double value)
Definition: Prediction.h:128
void SetPredictedScores(Aws::Map< Aws::String, double > &&value)
Definition: Prediction.h:119
#define AWS_MACHINELEARNING_API
JSON (JavaScript Object Notation).