AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Resource.h
1
6#pragma once
7#include <aws/inspector2/Inspector2_EXPORTS.h>
8#include <aws/inspector2/model/ResourceDetails.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/inspector2/model/ResourceType.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace Inspector2
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_INSPECTOR2_API Resource() = default;
39 AWS_INSPECTOR2_API Resource(Aws::Utils::Json::JsonView jsonValue);
40 AWS_INSPECTOR2_API Resource& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
48 inline const ResourceDetails& GetDetails() const { return m_details; }
49 inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; }
50 template<typename DetailsT = ResourceDetails>
51 void SetDetails(DetailsT&& value) { m_detailsHasBeenSet = true; m_details = std::forward<DetailsT>(value); }
52 template<typename DetailsT = ResourceDetails>
53 Resource& WithDetails(DetailsT&& value) { SetDetails(std::forward<DetailsT>(value)); return *this;}
55
57
60 inline const Aws::String& GetId() const { return m_id; }
61 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
62 template<typename IdT = Aws::String>
63 void SetId(IdT&& value) { m_idHasBeenSet = true; m_id = std::forward<IdT>(value); }
64 template<typename IdT = Aws::String>
65 Resource& WithId(IdT&& value) { SetId(std::forward<IdT>(value)); return *this;}
67
69
72 inline const Aws::String& GetPartition() const { return m_partition; }
73 inline bool PartitionHasBeenSet() const { return m_partitionHasBeenSet; }
74 template<typename PartitionT = Aws::String>
75 void SetPartition(PartitionT&& value) { m_partitionHasBeenSet = true; m_partition = std::forward<PartitionT>(value); }
76 template<typename PartitionT = Aws::String>
77 Resource& WithPartition(PartitionT&& value) { SetPartition(std::forward<PartitionT>(value)); return *this;}
79
81
84 inline const Aws::String& GetRegion() const { return m_region; }
85 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
86 template<typename RegionT = Aws::String>
87 void SetRegion(RegionT&& value) { m_regionHasBeenSet = true; m_region = std::forward<RegionT>(value); }
88 template<typename RegionT = Aws::String>
89 Resource& WithRegion(RegionT&& value) { SetRegion(std::forward<RegionT>(value)); return *this;}
91
93
96 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
97 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
98 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
99 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
100 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
101 Resource& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
102 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
103 Resource& AddTags(TagsKeyT&& key, TagsValueT&& value) {
104 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
105 }
107
109
112 inline ResourceType GetType() const { return m_type; }
113 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
114 inline void SetType(ResourceType value) { m_typeHasBeenSet = true; m_type = value; }
115 inline Resource& WithType(ResourceType value) { SetType(value); return *this;}
117 private:
118
119 ResourceDetails m_details;
120 bool m_detailsHasBeenSet = false;
121
122 Aws::String m_id;
123 bool m_idHasBeenSet = false;
124
125 Aws::String m_partition;
126 bool m_partitionHasBeenSet = false;
127
128 Aws::String m_region;
129 bool m_regionHasBeenSet = false;
130
132 bool m_tagsHasBeenSet = false;
133
135 bool m_typeHasBeenSet = false;
136 };
137
138} // namespace Model
139} // namespace Inspector2
140} // namespace Aws
AWS_INSPECTOR2_API Resource(Aws::Utils::Json::JsonView jsonValue)
Resource & WithDetails(DetailsT &&value)
Definition Resource.h:53
void SetDetails(DetailsT &&value)
Definition Resource.h:51
Resource & WithType(ResourceType value)
Definition Resource.h:115
Resource & WithRegion(RegionT &&value)
Definition Resource.h:89
const ResourceDetails & GetDetails() const
Definition Resource.h:48
const Aws::String & GetPartition() const
Definition Resource.h:72
void SetRegion(RegionT &&value)
Definition Resource.h:87
AWS_INSPECTOR2_API Resource()=default
const Aws::String & GetRegion() const
Definition Resource.h:84
ResourceType GetType() const
Definition Resource.h:112
void SetType(ResourceType value)
Definition Resource.h:114
void SetPartition(PartitionT &&value)
Definition Resource.h:75
Resource & WithTags(TagsT &&value)
Definition Resource.h:101
Resource & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Resource.h:103
AWS_INSPECTOR2_API Resource & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetTags(TagsT &&value)
Definition Resource.h:99
Resource & WithPartition(PartitionT &&value)
Definition Resource.h:77
Resource & WithId(IdT &&value)
Definition Resource.h:65
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Resource.h:96
AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetId() const
Definition Resource.h:60
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