AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetDetails(const ResourceDetails& value) { m_detailsHasBeenSet = true; m_details = value; }
51 inline void SetDetails(ResourceDetails&& value) { m_detailsHasBeenSet = true; m_details = std::move(value); }
52 inline Resource& WithDetails(const ResourceDetails& value) { SetDetails(value); return *this;}
53 inline Resource& WithDetails(ResourceDetails&& value) { SetDetails(std::move(value)); return *this;}
55
57
60 inline const Aws::String& GetId() const{ return m_id; }
61 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
62 inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
63 inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
64 inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
65 inline Resource& WithId(const Aws::String& value) { SetId(value); return *this;}
66 inline Resource& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
67 inline Resource& WithId(const char* value) { SetId(value); return *this;}
69
71
74 inline const Aws::String& GetPartition() const{ return m_partition; }
75 inline bool PartitionHasBeenSet() const { return m_partitionHasBeenSet; }
76 inline void SetPartition(const Aws::String& value) { m_partitionHasBeenSet = true; m_partition = value; }
77 inline void SetPartition(Aws::String&& value) { m_partitionHasBeenSet = true; m_partition = std::move(value); }
78 inline void SetPartition(const char* value) { m_partitionHasBeenSet = true; m_partition.assign(value); }
79 inline Resource& WithPartition(const Aws::String& value) { SetPartition(value); return *this;}
80 inline Resource& WithPartition(Aws::String&& value) { SetPartition(std::move(value)); return *this;}
81 inline Resource& WithPartition(const char* value) { SetPartition(value); return *this;}
83
85
88 inline const Aws::String& GetRegion() const{ return m_region; }
89 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
90 inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; }
91 inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); }
92 inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); }
93 inline Resource& WithRegion(const Aws::String& value) { SetRegion(value); return *this;}
94 inline Resource& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;}
95 inline Resource& WithRegion(const char* value) { SetRegion(value); return *this;}
97
99
102 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
103 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
104 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
105 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
106 inline Resource& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
107 inline Resource& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
108 inline Resource& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
109 inline Resource& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
110 inline Resource& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
111 inline Resource& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
112 inline Resource& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
113 inline Resource& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
114 inline Resource& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
116
118
121 inline const ResourceType& GetType() const{ return m_type; }
122 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
123 inline void SetType(const ResourceType& value) { m_typeHasBeenSet = true; m_type = value; }
124 inline void SetType(ResourceType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
125 inline Resource& WithType(const ResourceType& value) { SetType(value); return *this;}
126 inline Resource& WithType(ResourceType&& value) { SetType(std::move(value)); return *this;}
128 private:
129
130 ResourceDetails m_details;
131 bool m_detailsHasBeenSet = false;
132
133 Aws::String m_id;
134 bool m_idHasBeenSet = false;
135
136 Aws::String m_partition;
137 bool m_partitionHasBeenSet = false;
138
139 Aws::String m_region;
140 bool m_regionHasBeenSet = false;
141
143 bool m_tagsHasBeenSet = false;
144
145 ResourceType m_type;
146 bool m_typeHasBeenSet = false;
147 };
148
149} // namespace Model
150} // namespace Inspector2
151} // namespace Aws
Resource & WithId(const char *value)
Definition Resource.h:67
Resource & AddTags(Aws::String &&key, Aws::String &&value)
Definition Resource.h:111
Resource & WithPartition(Aws::String &&value)
Definition Resource.h:80
AWS_INSPECTOR2_API Resource(Aws::Utils::Json::JsonView jsonValue)
void SetRegion(const Aws::String &value)
Definition Resource.h:90
Resource & WithRegion(const char *value)
Definition Resource.h:95
void SetPartition(const Aws::String &value)
Definition Resource.h:76
Resource & WithDetails(ResourceDetails &&value)
Definition Resource.h:53
Resource & WithPartition(const Aws::String &value)
Definition Resource.h:79
const ResourceDetails & GetDetails() const
Definition Resource.h:48
const Aws::String & GetPartition() const
Definition Resource.h:74
void SetTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition Resource.h:105
const ResourceType & GetType() const
Definition Resource.h:121
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition Resource.h:104
const Aws::String & GetRegion() const
Definition Resource.h:88
Resource & AddTags(const char *key, Aws::String &&value)
Definition Resource.h:112
Resource & WithRegion(const Aws::String &value)
Definition Resource.h:93
void SetDetails(const ResourceDetails &value)
Definition Resource.h:50
void SetDetails(ResourceDetails &&value)
Definition Resource.h:51
Resource & AddTags(Aws::String &&key, const Aws::String &value)
Definition Resource.h:109
void SetId(const char *value)
Definition Resource.h:64
AWS_INSPECTOR2_API Resource()
Resource & AddTags(Aws::String &&key, const char *value)
Definition Resource.h:113
Resource & WithId(Aws::String &&value)
Definition Resource.h:66
void SetPartition(Aws::String &&value)
Definition Resource.h:77
Resource & WithPartition(const char *value)
Definition Resource.h:81
Resource & WithId(const Aws::String &value)
Definition Resource.h:65
Resource & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition Resource.h:107
AWS_INSPECTOR2_API Resource & operator=(Aws::Utils::Json::JsonView jsonValue)
Resource & AddTags(const char *key, const char *value)
Definition Resource.h:114
Resource & AddTags(const Aws::String &key, const Aws::String &value)
Definition Resource.h:108
Resource & AddTags(const Aws::String &key, Aws::String &&value)
Definition Resource.h:110
void SetRegion(Aws::String &&value)
Definition Resource.h:91
void SetId(const Aws::String &value)
Definition Resource.h:62
Resource & WithRegion(Aws::String &&value)
Definition Resource.h:94
void SetRegion(const char *value)
Definition Resource.h:92
void SetType(ResourceType &&value)
Definition Resource.h:124
Resource & WithType(const ResourceType &value)
Definition Resource.h:125
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Resource.h:102
Resource & WithType(ResourceType &&value)
Definition Resource.h:126
void SetPartition(const char *value)
Definition Resource.h:78
AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetId() const
Definition Resource.h:60
void SetType(const ResourceType &value)
Definition Resource.h:123
Resource & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition Resource.h:106
Resource & WithDetails(const ResourceDetails &value)
Definition Resource.h:52
void SetId(Aws::String &&value)
Definition Resource.h:63
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