AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateGrantRequest.h
1
6#pragma once
7#include <aws/license-manager/LicenseManager_EXPORTS.h>
8#include <aws/license-manager/LicenseManagerRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/license-manager/model/AllowedOperation.h>
12#include <aws/license-manager/model/Tag.h>
13#include <utility>
14
15namespace Aws
16{
17namespace LicenseManager
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_LICENSEMANAGER_API CreateGrantRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateGrant"; }
34
35 AWS_LICENSEMANAGER_API Aws::String SerializePayload() const override;
36
37 AWS_LICENSEMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38
39
41
45 inline const Aws::String& GetClientToken() const { return m_clientToken; }
46 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
47 template<typename ClientTokenT = Aws::String>
48 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
49 template<typename ClientTokenT = Aws::String>
50 CreateGrantRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
52
54
57 inline const Aws::String& GetGrantName() const { return m_grantName; }
58 inline bool GrantNameHasBeenSet() const { return m_grantNameHasBeenSet; }
59 template<typename GrantNameT = Aws::String>
60 void SetGrantName(GrantNameT&& value) { m_grantNameHasBeenSet = true; m_grantName = std::forward<GrantNameT>(value); }
61 template<typename GrantNameT = Aws::String>
62 CreateGrantRequest& WithGrantName(GrantNameT&& value) { SetGrantName(std::forward<GrantNameT>(value)); return *this;}
64
66
69 inline const Aws::String& GetLicenseArn() const { return m_licenseArn; }
70 inline bool LicenseArnHasBeenSet() const { return m_licenseArnHasBeenSet; }
71 template<typename LicenseArnT = Aws::String>
72 void SetLicenseArn(LicenseArnT&& value) { m_licenseArnHasBeenSet = true; m_licenseArn = std::forward<LicenseArnT>(value); }
73 template<typename LicenseArnT = Aws::String>
74 CreateGrantRequest& WithLicenseArn(LicenseArnT&& value) { SetLicenseArn(std::forward<LicenseArnT>(value)); return *this;}
76
78
86 inline const Aws::Vector<Aws::String>& GetPrincipals() const { return m_principals; }
87 inline bool PrincipalsHasBeenSet() const { return m_principalsHasBeenSet; }
88 template<typename PrincipalsT = Aws::Vector<Aws::String>>
89 void SetPrincipals(PrincipalsT&& value) { m_principalsHasBeenSet = true; m_principals = std::forward<PrincipalsT>(value); }
90 template<typename PrincipalsT = Aws::Vector<Aws::String>>
91 CreateGrantRequest& WithPrincipals(PrincipalsT&& value) { SetPrincipals(std::forward<PrincipalsT>(value)); return *this;}
92 template<typename PrincipalsT = Aws::String>
93 CreateGrantRequest& AddPrincipals(PrincipalsT&& value) { m_principalsHasBeenSet = true; m_principals.emplace_back(std::forward<PrincipalsT>(value)); return *this; }
95
97
100 inline const Aws::String& GetHomeRegion() const { return m_homeRegion; }
101 inline bool HomeRegionHasBeenSet() const { return m_homeRegionHasBeenSet; }
102 template<typename HomeRegionT = Aws::String>
103 void SetHomeRegion(HomeRegionT&& value) { m_homeRegionHasBeenSet = true; m_homeRegion = std::forward<HomeRegionT>(value); }
104 template<typename HomeRegionT = Aws::String>
105 CreateGrantRequest& WithHomeRegion(HomeRegionT&& value) { SetHomeRegion(std::forward<HomeRegionT>(value)); return *this;}
107
109
112 inline const Aws::Vector<AllowedOperation>& GetAllowedOperations() const { return m_allowedOperations; }
113 inline bool AllowedOperationsHasBeenSet() const { return m_allowedOperationsHasBeenSet; }
114 template<typename AllowedOperationsT = Aws::Vector<AllowedOperation>>
115 void SetAllowedOperations(AllowedOperationsT&& value) { m_allowedOperationsHasBeenSet = true; m_allowedOperations = std::forward<AllowedOperationsT>(value); }
116 template<typename AllowedOperationsT = Aws::Vector<AllowedOperation>>
117 CreateGrantRequest& WithAllowedOperations(AllowedOperationsT&& value) { SetAllowedOperations(std::forward<AllowedOperationsT>(value)); return *this;}
118 inline CreateGrantRequest& AddAllowedOperations(AllowedOperation value) { m_allowedOperationsHasBeenSet = true; m_allowedOperations.push_back(value); return *this; }
120
122
128 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
129 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
130 template<typename TagsT = Aws::Vector<Tag>>
131 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
132 template<typename TagsT = Aws::Vector<Tag>>
133 CreateGrantRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
134 template<typename TagsT = Tag>
135 CreateGrantRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
137 private:
138
139 Aws::String m_clientToken;
140 bool m_clientTokenHasBeenSet = false;
141
142 Aws::String m_grantName;
143 bool m_grantNameHasBeenSet = false;
144
145 Aws::String m_licenseArn;
146 bool m_licenseArnHasBeenSet = false;
147
148 Aws::Vector<Aws::String> m_principals;
149 bool m_principalsHasBeenSet = false;
150
151 Aws::String m_homeRegion;
152 bool m_homeRegionHasBeenSet = false;
153
154 Aws::Vector<AllowedOperation> m_allowedOperations;
155 bool m_allowedOperationsHasBeenSet = false;
156
157 Aws::Vector<Tag> m_tags;
158 bool m_tagsHasBeenSet = false;
159 };
160
161} // namespace Model
162} // namespace LicenseManager
163} // namespace Aws
CreateGrantRequest & AddPrincipals(PrincipalsT &&value)
const Aws::Vector< AllowedOperation > & GetAllowedOperations() const
virtual const char * GetServiceRequestName() const override
CreateGrantRequest & WithTags(TagsT &&value)
CreateGrantRequest & WithGrantName(GrantNameT &&value)
CreateGrantRequest & WithHomeRegion(HomeRegionT &&value)
const Aws::Vector< Aws::String > & GetPrincipals() const
CreateGrantRequest & WithLicenseArn(LicenseArnT &&value)
void SetAllowedOperations(AllowedOperationsT &&value)
AWS_LICENSEMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateGrantRequest & WithPrincipals(PrincipalsT &&value)
CreateGrantRequest & WithAllowedOperations(AllowedOperationsT &&value)
AWS_LICENSEMANAGER_API Aws::String SerializePayload() const override
CreateGrantRequest & AddTags(TagsT &&value)
AWS_LICENSEMANAGER_API CreateGrantRequest()=default
const Aws::Vector< Tag > & GetTags() const
CreateGrantRequest & AddAllowedOperations(AllowedOperation value)
CreateGrantRequest & WithClientToken(ClientTokenT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector