AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ToxicLabels.h
1
6#pragma once
7#include <aws/comprehend/Comprehend_EXPORTS.h>
8#include <aws/comprehend/model/ToxicContent.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace Comprehend {
21namespace Model {
22
33 public:
34 AWS_COMPREHEND_API ToxicLabels() = default;
35 AWS_COMPREHEND_API ToxicLabels(Aws::Utils::Json::JsonView jsonValue);
36 AWS_COMPREHEND_API ToxicLabels& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::Vector<ToxicContent>& GetLabels() const { return m_labels; }
44 inline bool LabelsHasBeenSet() const { return m_labelsHasBeenSet; }
45 template <typename LabelsT = Aws::Vector<ToxicContent>>
46 void SetLabels(LabelsT&& value) {
47 m_labelsHasBeenSet = true;
48 m_labels = std::forward<LabelsT>(value);
49 }
50 template <typename LabelsT = Aws::Vector<ToxicContent>>
51 ToxicLabels& WithLabels(LabelsT&& value) {
52 SetLabels(std::forward<LabelsT>(value));
53 return *this;
54 }
55 template <typename LabelsT = ToxicContent>
56 ToxicLabels& AddLabels(LabelsT&& value) {
57 m_labelsHasBeenSet = true;
58 m_labels.emplace_back(std::forward<LabelsT>(value));
59 return *this;
60 }
62
64
68 inline double GetToxicity() const { return m_toxicity; }
69 inline bool ToxicityHasBeenSet() const { return m_toxicityHasBeenSet; }
70 inline void SetToxicity(double value) {
71 m_toxicityHasBeenSet = true;
72 m_toxicity = value;
73 }
74 inline ToxicLabels& WithToxicity(double value) {
75 SetToxicity(value);
76 return *this;
77 }
79 private:
81
82 double m_toxicity{0.0};
83 bool m_labelsHasBeenSet = false;
84 bool m_toxicityHasBeenSet = false;
85};
86
87} // namespace Model
88} // namespace Comprehend
89} // namespace Aws
ToxicLabels & WithToxicity(double value)
Definition ToxicLabels.h:74
ToxicLabels & AddLabels(LabelsT &&value)
Definition ToxicLabels.h:56
void SetLabels(LabelsT &&value)
Definition ToxicLabels.h:46
AWS_COMPREHEND_API ToxicLabels(Aws::Utils::Json::JsonView jsonValue)
AWS_COMPREHEND_API ToxicLabels()=default
AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_COMPREHEND_API ToxicLabels & operator=(Aws::Utils::Json::JsonView jsonValue)
ToxicLabels & WithLabels(LabelsT &&value)
Definition ToxicLabels.h:51
const Aws::Vector< ToxicContent > & GetLabels() const
Definition ToxicLabels.h:43
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue