AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
UpdateDistributionRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/lightsail/LightsailRequest.h>
10#include <aws/lightsail/Lightsail_EXPORTS.h>
11#include <aws/lightsail/model/CacheBehavior.h>
12#include <aws/lightsail/model/CacheBehaviorPerPath.h>
13#include <aws/lightsail/model/CacheSettings.h>
14#include <aws/lightsail/model/InputOrigin.h>
15#include <aws/lightsail/model/ViewerMinimumTlsProtocolVersionEnum.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Lightsail {
21namespace Model {
22
26 public:
27 AWS_LIGHTSAIL_API UpdateDistributionRequest() = 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 "UpdateDistribution"; }
34
35 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
36
38
40
45 inline const Aws::String& GetDistributionName() const { return m_distributionName; }
46 inline bool DistributionNameHasBeenSet() const { return m_distributionNameHasBeenSet; }
47 template <typename DistributionNameT = Aws::String>
48 void SetDistributionName(DistributionNameT&& value) {
49 m_distributionNameHasBeenSet = true;
50 m_distributionName = std::forward<DistributionNameT>(value);
51 }
52 template <typename DistributionNameT = Aws::String>
53 UpdateDistributionRequest& WithDistributionName(DistributionNameT&& value) {
54 SetDistributionName(std::forward<DistributionNameT>(value));
55 return *this;
56 }
58
60
65 inline const InputOrigin& GetOrigin() const { return m_origin; }
66 inline bool OriginHasBeenSet() const { return m_originHasBeenSet; }
67 template <typename OriginT = InputOrigin>
68 void SetOrigin(OriginT&& value) {
69 m_originHasBeenSet = true;
70 m_origin = std::forward<OriginT>(value);
71 }
72 template <typename OriginT = InputOrigin>
74 SetOrigin(std::forward<OriginT>(value));
75 return *this;
76 }
78
80
83 inline const CacheBehavior& GetDefaultCacheBehavior() const { return m_defaultCacheBehavior; }
84 inline bool DefaultCacheBehaviorHasBeenSet() const { return m_defaultCacheBehaviorHasBeenSet; }
85 template <typename DefaultCacheBehaviorT = CacheBehavior>
86 void SetDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
87 m_defaultCacheBehaviorHasBeenSet = true;
88 m_defaultCacheBehavior = std::forward<DefaultCacheBehaviorT>(value);
89 }
90 template <typename DefaultCacheBehaviorT = CacheBehavior>
91 UpdateDistributionRequest& WithDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
92 SetDefaultCacheBehavior(std::forward<DefaultCacheBehaviorT>(value));
93 return *this;
94 }
96
98
104 inline const CacheSettings& GetCacheBehaviorSettings() const { return m_cacheBehaviorSettings; }
105 inline bool CacheBehaviorSettingsHasBeenSet() const { return m_cacheBehaviorSettingsHasBeenSet; }
106 template <typename CacheBehaviorSettingsT = CacheSettings>
107 void SetCacheBehaviorSettings(CacheBehaviorSettingsT&& value) {
108 m_cacheBehaviorSettingsHasBeenSet = true;
109 m_cacheBehaviorSettings = std::forward<CacheBehaviorSettingsT>(value);
110 }
111 template <typename CacheBehaviorSettingsT = CacheSettings>
112 UpdateDistributionRequest& WithCacheBehaviorSettings(CacheBehaviorSettingsT&& value) {
113 SetCacheBehaviorSettings(std::forward<CacheBehaviorSettingsT>(value));
114 return *this;
115 }
117
119
123 inline const Aws::Vector<CacheBehaviorPerPath>& GetCacheBehaviors() const { return m_cacheBehaviors; }
124 inline bool CacheBehaviorsHasBeenSet() const { return m_cacheBehaviorsHasBeenSet; }
125 template <typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
126 void SetCacheBehaviors(CacheBehaviorsT&& value) {
127 m_cacheBehaviorsHasBeenSet = true;
128 m_cacheBehaviors = std::forward<CacheBehaviorsT>(value);
129 }
130 template <typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
132 SetCacheBehaviors(std::forward<CacheBehaviorsT>(value));
133 return *this;
134 }
135 template <typename CacheBehaviorsT = CacheBehaviorPerPath>
137 m_cacheBehaviorsHasBeenSet = true;
138 m_cacheBehaviors.emplace_back(std::forward<CacheBehaviorsT>(value));
139 return *this;
140 }
142
144
147 inline bool GetIsEnabled() const { return m_isEnabled; }
148 inline bool IsEnabledHasBeenSet() const { return m_isEnabledHasBeenSet; }
149 inline void SetIsEnabled(bool value) {
150 m_isEnabledHasBeenSet = true;
151 m_isEnabled = value;
152 }
154 SetIsEnabled(value);
155 return *this;
156 }
158
160
164 inline ViewerMinimumTlsProtocolVersionEnum GetViewerMinimumTlsProtocolVersion() const { return m_viewerMinimumTlsProtocolVersion; }
165 inline bool ViewerMinimumTlsProtocolVersionHasBeenSet() const { return m_viewerMinimumTlsProtocolVersionHasBeenSet; }
167 m_viewerMinimumTlsProtocolVersionHasBeenSet = true;
168 m_viewerMinimumTlsProtocolVersion = value;
169 }
172 return *this;
173 }
175
177
184 inline const Aws::String& GetCertificateName() const { return m_certificateName; }
185 inline bool CertificateNameHasBeenSet() const { return m_certificateNameHasBeenSet; }
186 template <typename CertificateNameT = Aws::String>
187 void SetCertificateName(CertificateNameT&& value) {
188 m_certificateNameHasBeenSet = true;
189 m_certificateName = std::forward<CertificateNameT>(value);
190 }
191 template <typename CertificateNameT = Aws::String>
193 SetCertificateName(std::forward<CertificateNameT>(value));
194 return *this;
195 }
197
199
206 inline bool GetUseDefaultCertificate() const { return m_useDefaultCertificate; }
207 inline bool UseDefaultCertificateHasBeenSet() const { return m_useDefaultCertificateHasBeenSet; }
208 inline void SetUseDefaultCertificate(bool value) {
209 m_useDefaultCertificateHasBeenSet = true;
210 m_useDefaultCertificate = value;
211 }
214 return *this;
215 }
217 private:
218 Aws::String m_distributionName;
219
220 InputOrigin m_origin;
221
222 CacheBehavior m_defaultCacheBehavior;
223
224 CacheSettings m_cacheBehaviorSettings;
225
226 Aws::Vector<CacheBehaviorPerPath> m_cacheBehaviors;
227
228 bool m_isEnabled{false};
229
231
232 Aws::String m_certificateName;
233
234 bool m_useDefaultCertificate{false};
235 bool m_distributionNameHasBeenSet = false;
236 bool m_originHasBeenSet = false;
237 bool m_defaultCacheBehaviorHasBeenSet = false;
238 bool m_cacheBehaviorSettingsHasBeenSet = false;
239 bool m_cacheBehaviorsHasBeenSet = false;
240 bool m_isEnabledHasBeenSet = false;
241 bool m_viewerMinimumTlsProtocolVersionHasBeenSet = false;
242 bool m_certificateNameHasBeenSet = false;
243 bool m_useDefaultCertificateHasBeenSet = false;
244};
245
246} // namespace Model
247} // namespace Lightsail
248} // namespace Aws
UpdateDistributionRequest & WithDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
UpdateDistributionRequest & AddCacheBehaviors(CacheBehaviorsT &&value)
void SetCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
UpdateDistributionRequest & WithCacheBehaviors(CacheBehaviorsT &&value)
UpdateDistributionRequest & WithIsEnabled(bool value)
UpdateDistributionRequest & WithCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
UpdateDistributionRequest & WithViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionEnum value)
ViewerMinimumTlsProtocolVersionEnum GetViewerMinimumTlsProtocolVersion() const
void SetViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionEnum value)
const Aws::Vector< CacheBehaviorPerPath > & GetCacheBehaviors() const
UpdateDistributionRequest & WithOrigin(OriginT &&value)
AWS_LIGHTSAIL_API UpdateDistributionRequest()=default
UpdateDistributionRequest & WithDistributionName(DistributionNameT &&value)
void SetDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
UpdateDistributionRequest & WithCertificateName(CertificateNameT &&value)
virtual const char * GetServiceRequestName() const override
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
UpdateDistributionRequest & WithUseDefaultCertificate(bool 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