AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateDistributionRequest.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/IpAddressType.h>
15#include <aws/lightsail/model/ViewerMinimumTlsProtocolVersionEnum.h>
16#include <aws/lightsail/model/CacheBehaviorPerPath.h>
17#include <aws/lightsail/model/Tag.h>
18#include <utility>
19
20namespace Aws
21{
22namespace Lightsail
23{
24namespace Model
25{
26
30 {
31 public:
32 AWS_LIGHTSAIL_API CreateDistributionRequest() = default;
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "CreateDistribution"; }
39
40 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
41
43
44
46
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 CreateDistributionRequest& 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 CreateDistributionRequest& 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 CreateDistributionRequest& WithDefaultCacheBehavior(DefaultCacheBehaviorT&& value) { SetDefaultCacheBehavior(std::forward<DefaultCacheBehaviorT>(value)); return *this;}
82
84
88 inline const CacheSettings& GetCacheBehaviorSettings() const { return m_cacheBehaviorSettings; }
89 inline bool CacheBehaviorSettingsHasBeenSet() const { return m_cacheBehaviorSettingsHasBeenSet; }
90 template<typename CacheBehaviorSettingsT = CacheSettings>
91 void SetCacheBehaviorSettings(CacheBehaviorSettingsT&& value) { m_cacheBehaviorSettingsHasBeenSet = true; m_cacheBehaviorSettings = std::forward<CacheBehaviorSettingsT>(value); }
92 template<typename CacheBehaviorSettingsT = CacheSettings>
93 CreateDistributionRequest& WithCacheBehaviorSettings(CacheBehaviorSettingsT&& value) { SetCacheBehaviorSettings(std::forward<CacheBehaviorSettingsT>(value)); return *this;}
95
97
101 inline const Aws::Vector<CacheBehaviorPerPath>& GetCacheBehaviors() const { return m_cacheBehaviors; }
102 inline bool CacheBehaviorsHasBeenSet() const { return m_cacheBehaviorsHasBeenSet; }
103 template<typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
104 void SetCacheBehaviors(CacheBehaviorsT&& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors = std::forward<CacheBehaviorsT>(value); }
105 template<typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
106 CreateDistributionRequest& WithCacheBehaviors(CacheBehaviorsT&& value) { SetCacheBehaviors(std::forward<CacheBehaviorsT>(value)); return *this;}
107 template<typename CacheBehaviorsT = CacheBehaviorPerPath>
108 CreateDistributionRequest& AddCacheBehaviors(CacheBehaviorsT&& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors.emplace_back(std::forward<CacheBehaviorsT>(value)); return *this; }
110
112
119 inline const Aws::String& GetBundleId() const { return m_bundleId; }
120 inline bool BundleIdHasBeenSet() const { return m_bundleIdHasBeenSet; }
121 template<typename BundleIdT = Aws::String>
122 void SetBundleId(BundleIdT&& value) { m_bundleIdHasBeenSet = true; m_bundleId = std::forward<BundleIdT>(value); }
123 template<typename BundleIdT = Aws::String>
124 CreateDistributionRequest& WithBundleId(BundleIdT&& value) { SetBundleId(std::forward<BundleIdT>(value)); return *this;}
126
128
133 inline IpAddressType GetIpAddressType() const { return m_ipAddressType; }
134 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
135 inline void SetIpAddressType(IpAddressType value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = value; }
138
140
145 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
146 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
147 template<typename TagsT = Aws::Vector<Tag>>
148 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
149 template<typename TagsT = Aws::Vector<Tag>>
150 CreateDistributionRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
151 template<typename TagsT = Tag>
152 CreateDistributionRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
154
156
162 inline const Aws::String& GetCertificateName() const { return m_certificateName; }
163 inline bool CertificateNameHasBeenSet() const { return m_certificateNameHasBeenSet; }
164 template<typename CertificateNameT = Aws::String>
165 void SetCertificateName(CertificateNameT&& value) { m_certificateNameHasBeenSet = true; m_certificateName = std::forward<CertificateNameT>(value); }
166 template<typename CertificateNameT = Aws::String>
167 CreateDistributionRequest& WithCertificateName(CertificateNameT&& value) { SetCertificateName(std::forward<CertificateNameT>(value)); return *this;}
169
171
174 inline ViewerMinimumTlsProtocolVersionEnum GetViewerMinimumTlsProtocolVersion() const { return m_viewerMinimumTlsProtocolVersion; }
175 inline bool ViewerMinimumTlsProtocolVersionHasBeenSet() const { return m_viewerMinimumTlsProtocolVersionHasBeenSet; }
176 inline void SetViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionEnum value) { m_viewerMinimumTlsProtocolVersionHasBeenSet = true; m_viewerMinimumTlsProtocolVersion = value; }
179 private:
180
181 Aws::String m_distributionName;
182 bool m_distributionNameHasBeenSet = false;
183
184 InputOrigin m_origin;
185 bool m_originHasBeenSet = false;
186
187 CacheBehavior m_defaultCacheBehavior;
188 bool m_defaultCacheBehaviorHasBeenSet = false;
189
190 CacheSettings m_cacheBehaviorSettings;
191 bool m_cacheBehaviorSettingsHasBeenSet = false;
192
193 Aws::Vector<CacheBehaviorPerPath> m_cacheBehaviors;
194 bool m_cacheBehaviorsHasBeenSet = false;
195
196 Aws::String m_bundleId;
197 bool m_bundleIdHasBeenSet = false;
198
199 IpAddressType m_ipAddressType{IpAddressType::NOT_SET};
200 bool m_ipAddressTypeHasBeenSet = false;
201
202 Aws::Vector<Tag> m_tags;
203 bool m_tagsHasBeenSet = false;
204
205 Aws::String m_certificateName;
206 bool m_certificateNameHasBeenSet = false;
207
209 bool m_viewerMinimumTlsProtocolVersionHasBeenSet = false;
210 };
211
212} // namespace Model
213} // namespace Lightsail
214} // namespace Aws
CreateDistributionRequest & WithViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionEnum value)
CreateDistributionRequest & WithDistributionName(DistributionNameT &&value)
void SetCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
void SetViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionEnum value)
CreateDistributionRequest & AddTags(TagsT &&value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateDistributionRequest & WithDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
CreateDistributionRequest & WithCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
const Aws::Vector< CacheBehaviorPerPath > & GetCacheBehaviors() const
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
void SetDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
virtual const char * GetServiceRequestName() const override
CreateDistributionRequest & AddCacheBehaviors(CacheBehaviorsT &&value)
CreateDistributionRequest & WithIpAddressType(IpAddressType value)
ViewerMinimumTlsProtocolVersionEnum GetViewerMinimumTlsProtocolVersion() const
CreateDistributionRequest & WithCacheBehaviors(CacheBehaviorsT &&value)
CreateDistributionRequest & WithCertificateName(CertificateNameT &&value)
AWS_LIGHTSAIL_API CreateDistributionRequest()=default
CreateDistributionRequest & WithOrigin(OriginT &&value)
CreateDistributionRequest & WithBundleId(BundleIdT &&value)
CreateDistributionRequest & WithTags(TagsT &&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