AWS SDK for C++

AWS SDK for C++ Version 1.11.632

Loading...
Searching...
No Matches
Resource.h
1
6#pragma once
7#include <aws/inspector2/Inspector2_EXPORTS.h>
8#include <aws/inspector2/model/ResourceType.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/inspector2/model/ResourceDetails.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 ResourceType GetType() const { return m_type; }
49 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
50 inline void SetType(ResourceType value) { m_typeHasBeenSet = true; m_type = value; }
51 inline Resource& WithType(ResourceType value) { SetType(value); return *this;}
53
55
58 inline const Aws::String& GetId() const { return m_id; }
59 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
60 template<typename IdT = Aws::String>
61 void SetId(IdT&& value) { m_idHasBeenSet = true; m_id = std::forward<IdT>(value); }
62 template<typename IdT = Aws::String>
63 Resource& WithId(IdT&& value) { SetId(std::forward<IdT>(value)); return *this;}
65
67
70 inline const Aws::String& GetPartition() const { return m_partition; }
71 inline bool PartitionHasBeenSet() const { return m_partitionHasBeenSet; }
72 template<typename PartitionT = Aws::String>
73 void SetPartition(PartitionT&& value) { m_partitionHasBeenSet = true; m_partition = std::forward<PartitionT>(value); }
74 template<typename PartitionT = Aws::String>
75 Resource& WithPartition(PartitionT&& value) { SetPartition(std::forward<PartitionT>(value)); return *this;}
77
79
82 inline const Aws::String& GetRegion() const { return m_region; }
83 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
84 template<typename RegionT = Aws::String>
85 void SetRegion(RegionT&& value) { m_regionHasBeenSet = true; m_region = std::forward<RegionT>(value); }
86 template<typename RegionT = Aws::String>
87 Resource& WithRegion(RegionT&& value) { SetRegion(std::forward<RegionT>(value)); return *this;}
89
91
94 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
95 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
96 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
97 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
98 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
99 Resource& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
100 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
101 Resource& AddTags(TagsKeyT&& key, TagsValueT&& value) {
102 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
103 }
105
107
110 inline const ResourceDetails& GetDetails() const { return m_details; }
111 inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; }
112 template<typename DetailsT = ResourceDetails>
113 void SetDetails(DetailsT&& value) { m_detailsHasBeenSet = true; m_details = std::forward<DetailsT>(value); }
114 template<typename DetailsT = ResourceDetails>
115 Resource& WithDetails(DetailsT&& value) { SetDetails(std::forward<DetailsT>(value)); return *this;}
117 private:
118
120 bool m_typeHasBeenSet = 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
134 ResourceDetails m_details;
135 bool m_detailsHasBeenSet = 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:115
void SetDetails(DetailsT &&value)
Definition Resource.h:113
Resource & WithType(ResourceType value)
Definition Resource.h:51
Resource & WithRegion(RegionT &&value)
Definition Resource.h:87
const ResourceDetails & GetDetails() const
Definition Resource.h:110
const Aws::String & GetPartition() const
Definition Resource.h:70
void SetRegion(RegionT &&value)
Definition Resource.h:85
AWS_INSPECTOR2_API Resource()=default
const Aws::String & GetRegion() const
Definition Resource.h:82
ResourceType GetType() const
Definition Resource.h:48
void SetType(ResourceType value)
Definition Resource.h:50
void SetPartition(PartitionT &&value)
Definition Resource.h:73
Resource & WithTags(TagsT &&value)
Definition Resource.h:99
Resource & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Resource.h:101
AWS_INSPECTOR2_API Resource & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetTags(TagsT &&value)
Definition Resource.h:97
Resource & WithPartition(PartitionT &&value)
Definition Resource.h:75
Resource & WithId(IdT &&value)
Definition Resource.h:63
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Resource.h:94
AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetId() const
Definition Resource.h:58
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