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/ecr/ECR_EXPORTS.h>
8#include <aws/ecr/model/ResourceDetails.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace ECR
24{
25namespace Model
26{
27
34 {
35 public:
36 AWS_ECR_API Resource() = default;
37 AWS_ECR_API Resource(Aws::Utils::Json::JsonView jsonValue);
40
41
43
46 inline const ResourceDetails& GetDetails() const { return m_details; }
47 inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; }
48 template<typename DetailsT = ResourceDetails>
49 void SetDetails(DetailsT&& value) { m_detailsHasBeenSet = true; m_details = std::forward<DetailsT>(value); }
50 template<typename DetailsT = ResourceDetails>
51 Resource& WithDetails(DetailsT&& value) { SetDetails(std::forward<DetailsT>(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::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
71 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
72 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
73 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
74 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
75 Resource& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
76 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
77 Resource& AddTags(TagsKeyT&& key, TagsValueT&& value) {
78 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
79 }
81
83
86 inline const Aws::String& GetType() const { return m_type; }
87 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
88 template<typename TypeT = Aws::String>
89 void SetType(TypeT&& value) { m_typeHasBeenSet = true; m_type = std::forward<TypeT>(value); }
90 template<typename TypeT = Aws::String>
91 Resource& WithType(TypeT&& value) { SetType(std::forward<TypeT>(value)); return *this;}
93 private:
94
95 ResourceDetails m_details;
96 bool m_detailsHasBeenSet = false;
97
98 Aws::String m_id;
99 bool m_idHasBeenSet = false;
100
102 bool m_tagsHasBeenSet = false;
103
104 Aws::String m_type;
105 bool m_typeHasBeenSet = false;
106 };
107
108} // namespace Model
109} // namespace ECR
110} // namespace Aws
AWS_ECR_API Resource()=default
void SetTags(TagsT &&value)
Definition Resource.h:73
bool TypeHasBeenSet() const
Definition Resource.h:87
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:49
bool IdHasBeenSet() const
Definition Resource.h:59
void SetType(TypeT &&value)
Definition Resource.h:89
bool TagsHasBeenSet() const
Definition Resource.h:71
const Aws::String & GetId() const
Definition Resource.h:58
const Aws::String & GetType() const
Definition Resource.h:86
Resource & WithId(IdT &&value)
Definition Resource.h:63
Resource & WithTags(TagsT &&value)
Definition Resource.h:75
void SetId(IdT &&value)
Definition Resource.h:61
AWS_ECR_API Aws::Utils::Json::JsonValue Jsonize() const
const ResourceDetails & GetDetails() const
Definition Resource.h:46
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Resource.h:70
Resource & WithType(TypeT &&value)
Definition Resource.h:91
Resource & WithDetails(DetailsT &&value)
Definition Resource.h:51
bool DetailsHasBeenSet() const
Definition Resource.h:47
Resource & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Resource.h:77
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