AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ComplianceViolator.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/fms/FMS_EXPORTS.h>
10#include <aws/fms/model/ViolationReason.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace FMS {
22namespace Model {
23
31 public:
32 AWS_FMS_API ComplianceViolator() = default;
36
38
41 inline const Aws::String& GetResourceId() const { return m_resourceId; }
42 inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
43 template <typename ResourceIdT = Aws::String>
44 void SetResourceId(ResourceIdT&& value) {
45 m_resourceIdHasBeenSet = true;
46 m_resourceId = std::forward<ResourceIdT>(value);
47 }
48 template <typename ResourceIdT = Aws::String>
49 ComplianceViolator& WithResourceId(ResourceIdT&& value) {
50 SetResourceId(std::forward<ResourceIdT>(value));
51 return *this;
52 }
54
56
59 inline ViolationReason GetViolationReason() const { return m_violationReason; }
60 inline bool ViolationReasonHasBeenSet() const { return m_violationReasonHasBeenSet; }
62 m_violationReasonHasBeenSet = true;
63 m_violationReason = value;
64 }
66 SetViolationReason(value);
67 return *this;
68 }
70
72
80 inline const Aws::String& GetResourceType() const { return m_resourceType; }
81 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
82 template <typename ResourceTypeT = Aws::String>
83 void SetResourceType(ResourceTypeT&& value) {
84 m_resourceTypeHasBeenSet = true;
85 m_resourceType = std::forward<ResourceTypeT>(value);
86 }
87 template <typename ResourceTypeT = Aws::String>
88 ComplianceViolator& WithResourceType(ResourceTypeT&& value) {
89 SetResourceType(std::forward<ResourceTypeT>(value));
90 return *this;
91 }
93
95
98 inline const Aws::Map<Aws::String, Aws::String>& GetMetadata() const { return m_metadata; }
99 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
100 template <typename MetadataT = Aws::Map<Aws::String, Aws::String>>
101 void SetMetadata(MetadataT&& value) {
102 m_metadataHasBeenSet = true;
103 m_metadata = std::forward<MetadataT>(value);
104 }
105 template <typename MetadataT = Aws::Map<Aws::String, Aws::String>>
106 ComplianceViolator& WithMetadata(MetadataT&& value) {
107 SetMetadata(std::forward<MetadataT>(value));
108 return *this;
109 }
110 template <typename MetadataKeyT = Aws::String, typename MetadataValueT = Aws::String>
111 ComplianceViolator& AddMetadata(MetadataKeyT&& key, MetadataValueT&& value) {
112 m_metadataHasBeenSet = true;
113 m_metadata.emplace(std::forward<MetadataKeyT>(key), std::forward<MetadataValueT>(value));
114 return *this;
115 }
117 private:
118 Aws::String m_resourceId;
119
120 ViolationReason m_violationReason{ViolationReason::NOT_SET};
121
122 Aws::String m_resourceType;
123
125 bool m_resourceIdHasBeenSet = false;
126 bool m_violationReasonHasBeenSet = false;
127 bool m_resourceTypeHasBeenSet = false;
128 bool m_metadataHasBeenSet = false;
129};
130
131} // namespace Model
132} // namespace FMS
133} // namespace Aws
ViolationReason GetViolationReason() const
AWS_FMS_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_FMS_API ComplianceViolator(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetResourceType() const
AWS_FMS_API ComplianceViolator()=default
AWS_FMS_API ComplianceViolator & operator=(Aws::Utils::Json::JsonView jsonValue)
ComplianceViolator & WithResourceType(ResourceTypeT &&value)
ComplianceViolator & WithResourceId(ResourceIdT &&value)
void SetResourceId(ResourceIdT &&value)
void SetResourceType(ResourceTypeT &&value)
ComplianceViolator & WithViolationReason(ViolationReason value)
const Aws::String & GetResourceId() const
const Aws::Map< Aws::String, Aws::String > & GetMetadata() const
void SetViolationReason(ViolationReason value)
ComplianceViolator & WithMetadata(MetadataT &&value)
ComplianceViolator & AddMetadata(MetadataKeyT &&key, MetadataValueT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue