AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Resource.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/ecr/ECR_EXPORTS.h>
10#include <aws/ecr/model/ResourceDetails.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace ECR {
22namespace Model {
23
29class Resource {
30 public:
31 AWS_ECR_API Resource() = default;
32 AWS_ECR_API Resource(Aws::Utils::Json::JsonView jsonValue);
35
37
40 inline const ResourceDetails& GetDetails() const { return m_details; }
41 inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; }
42 template <typename DetailsT = ResourceDetails>
43 void SetDetails(DetailsT&& value) {
44 m_detailsHasBeenSet = true;
45 m_details = std::forward<DetailsT>(value);
46 }
47 template <typename DetailsT = ResourceDetails>
48 Resource& WithDetails(DetailsT&& value) {
49 SetDetails(std::forward<DetailsT>(value));
50 return *this;
51 }
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) {
62 m_idHasBeenSet = true;
63 m_id = std::forward<IdT>(value);
64 }
65 template <typename IdT = Aws::String>
66 Resource& WithId(IdT&& value) {
67 SetId(std::forward<IdT>(value));
68 return *this;
69 }
71
73
76 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
77 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
78 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
79 void SetTags(TagsT&& value) {
80 m_tagsHasBeenSet = true;
81 m_tags = std::forward<TagsT>(value);
82 }
83 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
84 Resource& WithTags(TagsT&& value) {
85 SetTags(std::forward<TagsT>(value));
86 return *this;
87 }
88 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
89 Resource& AddTags(TagsKeyT&& key, TagsValueT&& value) {
90 m_tagsHasBeenSet = true;
91 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
92 return *this;
93 }
95
97
100 inline const Aws::String& GetType() const { return m_type; }
101 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
102 template <typename TypeT = Aws::String>
103 void SetType(TypeT&& value) {
104 m_typeHasBeenSet = true;
105 m_type = std::forward<TypeT>(value);
106 }
107 template <typename TypeT = Aws::String>
108 Resource& WithType(TypeT&& value) {
109 SetType(std::forward<TypeT>(value));
110 return *this;
111 }
113 private:
114 ResourceDetails m_details;
115
116 Aws::String m_id;
117
119
120 Aws::String m_type;
121 bool m_detailsHasBeenSet = false;
122 bool m_idHasBeenSet = false;
123 bool m_tagsHasBeenSet = false;
124 bool m_typeHasBeenSet = false;
125};
126
127} // namespace Model
128} // namespace ECR
129} // namespace Aws
AWS_ECR_API Resource()=default
void SetTags(TagsT &&value)
Definition Resource.h:79
bool TypeHasBeenSet() const
Definition Resource.h:101
AWS_ECR_API Resource & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_ECR_API Resource(Aws::Utils::Json::JsonView jsonValue)
void SetDetails(DetailsT &&value)
Definition Resource.h:43
bool IdHasBeenSet() const
Definition Resource.h:59
void SetType(TypeT &&value)
Definition Resource.h:103
bool TagsHasBeenSet() const
Definition Resource.h:77
const Aws::String & GetId() const
Definition Resource.h:58
const Aws::String & GetType() const
Definition Resource.h:100
Resource & WithId(IdT &&value)
Definition Resource.h:66
Resource & WithTags(TagsT &&value)
Definition Resource.h:84
void SetId(IdT &&value)
Definition Resource.h:61
AWS_ECR_API Aws::Utils::Json::JsonValue Jsonize() const
const ResourceDetails & GetDetails() const
Definition Resource.h:40
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Resource.h:76
Resource & WithType(TypeT &&value)
Definition Resource.h:108
Resource & WithDetails(DetailsT &&value)
Definition Resource.h:48
bool DetailsHasBeenSet() const
Definition Resource.h:41
Resource & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Resource.h:89
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