AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
UpdateDistributionRequest.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/lightsail/LightsailRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/lightsail/model/InputOrigin.h>
11#include <aws/lightsail/model/CacheBehavior.h>
12#include <aws/lightsail/model/CacheSettings.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14#include <aws/lightsail/model/ViewerMinimumTlsProtocolVersionEnum.h>
15#include <aws/lightsail/model/CacheBehaviorPerPath.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Lightsail
21{
22namespace Model
23{
24
28 {
29 public:
30 AWS_LIGHTSAIL_API UpdateDistributionRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "UpdateDistribution"; }
37
38 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
39
41
42
44
49 inline const Aws::String& GetDistributionName() const { return m_distributionName; }
50 inline bool DistributionNameHasBeenSet() const { return m_distributionNameHasBeenSet; }
51 template<typename DistributionNameT = Aws::String>
52 void SetDistributionName(DistributionNameT&& value) { m_distributionNameHasBeenSet = true; m_distributionName = std::forward<DistributionNameT>(value); }
53 template<typename DistributionNameT = Aws::String>
54 UpdateDistributionRequest& WithDistributionName(DistributionNameT&& value) { SetDistributionName(std::forward<DistributionNameT>(value)); return *this;}
56
58
63 inline const InputOrigin& GetOrigin() const { return m_origin; }
64 inline bool OriginHasBeenSet() const { return m_originHasBeenSet; }
65 template<typename OriginT = InputOrigin>
66 void SetOrigin(OriginT&& value) { m_originHasBeenSet = true; m_origin = std::forward<OriginT>(value); }
67 template<typename OriginT = InputOrigin>
68 UpdateDistributionRequest& WithOrigin(OriginT&& value) { SetOrigin(std::forward<OriginT>(value)); return *this;}
70
72
75 inline const CacheBehavior& GetDefaultCacheBehavior() const { return m_defaultCacheBehavior; }
76 inline bool DefaultCacheBehaviorHasBeenSet() const { return m_defaultCacheBehaviorHasBeenSet; }
77 template<typename DefaultCacheBehaviorT = CacheBehavior>
78 void SetDefaultCacheBehavior(DefaultCacheBehaviorT&& value) { m_defaultCacheBehaviorHasBeenSet = true; m_defaultCacheBehavior = std::forward<DefaultCacheBehaviorT>(value); }
79 template<typename DefaultCacheBehaviorT = CacheBehavior>
80 UpdateDistributionRequest& WithDefaultCacheBehavior(DefaultCacheBehaviorT&& value) { SetDefaultCacheBehavior(std::forward<DefaultCacheBehaviorT>(value)); return *this;}
82
84
90 inline const CacheSettings& GetCacheBehaviorSettings() const { return m_cacheBehaviorSettings; }
91 inline bool CacheBehaviorSettingsHasBeenSet() const { return m_cacheBehaviorSettingsHasBeenSet; }
92 template<typename CacheBehaviorSettingsT = CacheSettings>
93 void SetCacheBehaviorSettings(CacheBehaviorSettingsT&& value) { m_cacheBehaviorSettingsHasBeenSet = true; m_cacheBehaviorSettings = std::forward<CacheBehaviorSettingsT>(value); }
94 template<typename CacheBehaviorSettingsT = CacheSettings>
95 UpdateDistributionRequest& WithCacheBehaviorSettings(CacheBehaviorSettingsT&& value) { SetCacheBehaviorSettings(std::forward<CacheBehaviorSettingsT>(value)); return *this;}
97
99
103 inline const Aws::Vector<CacheBehaviorPerPath>& GetCacheBehaviors() const { return m_cacheBehaviors; }
104 inline bool CacheBehaviorsHasBeenSet() const { return m_cacheBehaviorsHasBeenSet; }
105 template<typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
106 void SetCacheBehaviors(CacheBehaviorsT&& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors = std::forward<CacheBehaviorsT>(value); }
107 template<typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
108 UpdateDistributionRequest& WithCacheBehaviors(CacheBehaviorsT&& value) { SetCacheBehaviors(std::forward<CacheBehaviorsT>(value)); return *this;}
109 template<typename CacheBehaviorsT = CacheBehaviorPerPath>
110 UpdateDistributionRequest& AddCacheBehaviors(CacheBehaviorsT&& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors.emplace_back(std::forward<CacheBehaviorsT>(value)); return *this; }
112
114
117 inline bool GetIsEnabled() const { return m_isEnabled; }
118 inline bool IsEnabledHasBeenSet() const { return m_isEnabledHasBeenSet; }
119 inline void SetIsEnabled(bool value) { m_isEnabledHasBeenSet = true; m_isEnabled = value; }
120 inline UpdateDistributionRequest& WithIsEnabled(bool value) { SetIsEnabled(value); return *this;}
122
124
128 inline ViewerMinimumTlsProtocolVersionEnum GetViewerMinimumTlsProtocolVersion() const { return m_viewerMinimumTlsProtocolVersion; }
129 inline bool ViewerMinimumTlsProtocolVersionHasBeenSet() const { return m_viewerMinimumTlsProtocolVersionHasBeenSet; }
130 inline void SetViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionEnum value) { m_viewerMinimumTlsProtocolVersionHasBeenSet = true; m_viewerMinimumTlsProtocolVersion = value; }
133
135
142 inline const Aws::String& GetCertificateName() const { return m_certificateName; }
143 inline bool CertificateNameHasBeenSet() const { return m_certificateNameHasBeenSet; }
144 template<typename CertificateNameT = Aws::String>
145 void SetCertificateName(CertificateNameT&& value) { m_certificateNameHasBeenSet = true; m_certificateName = std::forward<CertificateNameT>(value); }
146 template<typename CertificateNameT = Aws::String>
147 UpdateDistributionRequest& WithCertificateName(CertificateNameT&& value) { SetCertificateName(std::forward<CertificateNameT>(value)); return *this;}
149
151
158 inline bool GetUseDefaultCertificate() const { return m_useDefaultCertificate; }
159 inline bool UseDefaultCertificateHasBeenSet() const { return m_useDefaultCertificateHasBeenSet; }
160 inline void SetUseDefaultCertificate(bool value) { m_useDefaultCertificateHasBeenSet = true; m_useDefaultCertificate = value; }
163 private:
164
165 Aws::String m_distributionName;
166 bool m_distributionNameHasBeenSet = false;
167
168 InputOrigin m_origin;
169 bool m_originHasBeenSet = false;
170
171 CacheBehavior m_defaultCacheBehavior;
172 bool m_defaultCacheBehaviorHasBeenSet = false;
173
174 CacheSettings m_cacheBehaviorSettings;
175 bool m_cacheBehaviorSettingsHasBeenSet = false;
176
177 Aws::Vector<CacheBehaviorPerPath> m_cacheBehaviors;
178 bool m_cacheBehaviorsHasBeenSet = false;
179
180 bool m_isEnabled{false};
181 bool m_isEnabledHasBeenSet = false;
182
184 bool m_viewerMinimumTlsProtocolVersionHasBeenSet = false;
185
186 Aws::String m_certificateName;
187 bool m_certificateNameHasBeenSet = false;
188
189 bool m_useDefaultCertificate{false};
190 bool m_useDefaultCertificateHasBeenSet = false;
191 };
192
193} // namespace Model
194} // namespace Lightsail
195} // 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