/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Lightsail { namespace Model { /** */ class CreateDistributionRequest : public LightsailRequest { public: AWS_LIGHTSAIL_API CreateDistributionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateDistribution"; } AWS_LIGHTSAIL_API Aws::String SerializePayload() const override; AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name for the distribution.

*/ inline const Aws::String& GetDistributionName() const{ return m_distributionName; } /** *

The name for the distribution.

*/ inline bool DistributionNameHasBeenSet() const { return m_distributionNameHasBeenSet; } /** *

The name for the distribution.

*/ inline void SetDistributionName(const Aws::String& value) { m_distributionNameHasBeenSet = true; m_distributionName = value; } /** *

The name for the distribution.

*/ inline void SetDistributionName(Aws::String&& value) { m_distributionNameHasBeenSet = true; m_distributionName = std::move(value); } /** *

The name for the distribution.

*/ inline void SetDistributionName(const char* value) { m_distributionNameHasBeenSet = true; m_distributionName.assign(value); } /** *

The name for the distribution.

*/ inline CreateDistributionRequest& WithDistributionName(const Aws::String& value) { SetDistributionName(value); return *this;} /** *

The name for the distribution.

*/ inline CreateDistributionRequest& WithDistributionName(Aws::String&& value) { SetDistributionName(std::move(value)); return *this;} /** *

The name for the distribution.

*/ inline CreateDistributionRequest& WithDistributionName(const char* value) { SetDistributionName(value); return *this;} /** *

An object that describes the origin resource for the distribution, such as a * Lightsail instance, bucket, or load balancer.

The distribution pulls, * caches, and serves content from the origin.

*/ inline const InputOrigin& GetOrigin() const{ return m_origin; } /** *

An object that describes the origin resource for the distribution, such as a * Lightsail instance, bucket, or load balancer.

The distribution pulls, * caches, and serves content from the origin.

*/ inline bool OriginHasBeenSet() const { return m_originHasBeenSet; } /** *

An object that describes the origin resource for the distribution, such as a * Lightsail instance, bucket, or load balancer.

The distribution pulls, * caches, and serves content from the origin.

*/ inline void SetOrigin(const InputOrigin& value) { m_originHasBeenSet = true; m_origin = value; } /** *

An object that describes the origin resource for the distribution, such as a * Lightsail instance, bucket, or load balancer.

The distribution pulls, * caches, and serves content from the origin.

*/ inline void SetOrigin(InputOrigin&& value) { m_originHasBeenSet = true; m_origin = std::move(value); } /** *

An object that describes the origin resource for the distribution, such as a * Lightsail instance, bucket, or load balancer.

The distribution pulls, * caches, and serves content from the origin.

*/ inline CreateDistributionRequest& WithOrigin(const InputOrigin& value) { SetOrigin(value); return *this;} /** *

An object that describes the origin resource for the distribution, such as a * Lightsail instance, bucket, or load balancer.

The distribution pulls, * caches, and serves content from the origin.

*/ inline CreateDistributionRequest& WithOrigin(InputOrigin&& value) { SetOrigin(std::move(value)); return *this;} /** *

An object that describes the default cache behavior for the distribution.

*/ inline const CacheBehavior& GetDefaultCacheBehavior() const{ return m_defaultCacheBehavior; } /** *

An object that describes the default cache behavior for the distribution.

*/ inline bool DefaultCacheBehaviorHasBeenSet() const { return m_defaultCacheBehaviorHasBeenSet; } /** *

An object that describes the default cache behavior for the distribution.

*/ inline void SetDefaultCacheBehavior(const CacheBehavior& value) { m_defaultCacheBehaviorHasBeenSet = true; m_defaultCacheBehavior = value; } /** *

An object that describes the default cache behavior for the distribution.

*/ inline void SetDefaultCacheBehavior(CacheBehavior&& value) { m_defaultCacheBehaviorHasBeenSet = true; m_defaultCacheBehavior = std::move(value); } /** *

An object that describes the default cache behavior for the distribution.

*/ inline CreateDistributionRequest& WithDefaultCacheBehavior(const CacheBehavior& value) { SetDefaultCacheBehavior(value); return *this;} /** *

An object that describes the default cache behavior for the distribution.

*/ inline CreateDistributionRequest& WithDefaultCacheBehavior(CacheBehavior&& value) { SetDefaultCacheBehavior(std::move(value)); return *this;} /** *

An object that describes the cache behavior settings for the * distribution.

*/ inline const CacheSettings& GetCacheBehaviorSettings() const{ return m_cacheBehaviorSettings; } /** *

An object that describes the cache behavior settings for the * distribution.

*/ inline bool CacheBehaviorSettingsHasBeenSet() const { return m_cacheBehaviorSettingsHasBeenSet; } /** *

An object that describes the cache behavior settings for the * distribution.

*/ inline void SetCacheBehaviorSettings(const CacheSettings& value) { m_cacheBehaviorSettingsHasBeenSet = true; m_cacheBehaviorSettings = value; } /** *

An object that describes the cache behavior settings for the * distribution.

*/ inline void SetCacheBehaviorSettings(CacheSettings&& value) { m_cacheBehaviorSettingsHasBeenSet = true; m_cacheBehaviorSettings = std::move(value); } /** *

An object that describes the cache behavior settings for the * distribution.

*/ inline CreateDistributionRequest& WithCacheBehaviorSettings(const CacheSettings& value) { SetCacheBehaviorSettings(value); return *this;} /** *

An object that describes the cache behavior settings for the * distribution.

*/ inline CreateDistributionRequest& WithCacheBehaviorSettings(CacheSettings&& value) { SetCacheBehaviorSettings(std::move(value)); return *this;} /** *

An array of objects that describe the per-path cache behavior for the * distribution.

*/ inline const Aws::Vector& GetCacheBehaviors() const{ return m_cacheBehaviors; } /** *

An array of objects that describe the per-path cache behavior for the * distribution.

*/ inline bool CacheBehaviorsHasBeenSet() const { return m_cacheBehaviorsHasBeenSet; } /** *

An array of objects that describe the per-path cache behavior for the * distribution.

*/ inline void SetCacheBehaviors(const Aws::Vector& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors = value; } /** *

An array of objects that describe the per-path cache behavior for the * distribution.

*/ inline void SetCacheBehaviors(Aws::Vector&& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors = std::move(value); } /** *

An array of objects that describe the per-path cache behavior for the * distribution.

*/ inline CreateDistributionRequest& WithCacheBehaviors(const Aws::Vector& value) { SetCacheBehaviors(value); return *this;} /** *

An array of objects that describe the per-path cache behavior for the * distribution.

*/ inline CreateDistributionRequest& WithCacheBehaviors(Aws::Vector&& value) { SetCacheBehaviors(std::move(value)); return *this;} /** *

An array of objects that describe the per-path cache behavior for the * distribution.

*/ inline CreateDistributionRequest& AddCacheBehaviors(const CacheBehaviorPerPath& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors.push_back(value); return *this; } /** *

An array of objects that describe the per-path cache behavior for the * distribution.

*/ inline CreateDistributionRequest& AddCacheBehaviors(CacheBehaviorPerPath&& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors.push_back(std::move(value)); return *this; } /** *

The bundle ID to use for the distribution.

A distribution bundle * describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota.

Use the * GetDistributionBundles action to get a list of distribution bundle * IDs that you can specify.

*/ inline const Aws::String& GetBundleId() const{ return m_bundleId; } /** *

The bundle ID to use for the distribution.

A distribution bundle * describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota.

Use the * GetDistributionBundles action to get a list of distribution bundle * IDs that you can specify.

*/ inline bool BundleIdHasBeenSet() const { return m_bundleIdHasBeenSet; } /** *

The bundle ID to use for the distribution.

A distribution bundle * describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota.

Use the * GetDistributionBundles action to get a list of distribution bundle * IDs that you can specify.

*/ inline void SetBundleId(const Aws::String& value) { m_bundleIdHasBeenSet = true; m_bundleId = value; } /** *

The bundle ID to use for the distribution.

A distribution bundle * describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota.

Use the * GetDistributionBundles action to get a list of distribution bundle * IDs that you can specify.

*/ inline void SetBundleId(Aws::String&& value) { m_bundleIdHasBeenSet = true; m_bundleId = std::move(value); } /** *

The bundle ID to use for the distribution.

A distribution bundle * describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota.

Use the * GetDistributionBundles action to get a list of distribution bundle * IDs that you can specify.

*/ inline void SetBundleId(const char* value) { m_bundleIdHasBeenSet = true; m_bundleId.assign(value); } /** *

The bundle ID to use for the distribution.

A distribution bundle * describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota.

Use the * GetDistributionBundles action to get a list of distribution bundle * IDs that you can specify.

*/ inline CreateDistributionRequest& WithBundleId(const Aws::String& value) { SetBundleId(value); return *this;} /** *

The bundle ID to use for the distribution.

A distribution bundle * describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota.

Use the * GetDistributionBundles action to get a list of distribution bundle * IDs that you can specify.

*/ inline CreateDistributionRequest& WithBundleId(Aws::String&& value) { SetBundleId(std::move(value)); return *this;} /** *

The bundle ID to use for the distribution.

A distribution bundle * describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota.

Use the * GetDistributionBundles action to get a list of distribution bundle * IDs that you can specify.

*/ inline CreateDistributionRequest& WithBundleId(const char* value) { SetBundleId(value); return *this;} /** *

The IP address type for the distribution.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline const IpAddressType& GetIpAddressType() const{ return m_ipAddressType; } /** *

The IP address type for the distribution.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; } /** *

The IP address type for the distribution.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline void SetIpAddressType(const IpAddressType& value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = value; } /** *

The IP address type for the distribution.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline void SetIpAddressType(IpAddressType&& value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = std::move(value); } /** *

The IP address type for the distribution.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline CreateDistributionRequest& WithIpAddressType(const IpAddressType& value) { SetIpAddressType(value); return *this;} /** *

The IP address type for the distribution.

The possible values are * ipv4 for IPv4 only, and dualstack for IPv4 and * IPv6.

The default value is dualstack.

*/ inline CreateDistributionRequest& WithIpAddressType(IpAddressType&& value) { SetIpAddressType(std::move(value)); return *this;} /** *

The tag keys and optional values to add to the distribution during * create.

Use the TagResource action to tag a resource after * it's created.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tag keys and optional values to add to the distribution during * create.

Use the TagResource action to tag a resource after * it's created.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tag keys and optional values to add to the distribution during * create.

Use the TagResource action to tag a resource after * it's created.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tag keys and optional values to add to the distribution during * create.

Use the TagResource action to tag a resource after * it's created.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tag keys and optional values to add to the distribution during * create.

Use the TagResource action to tag a resource after * it's created.

*/ inline CreateDistributionRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The tag keys and optional values to add to the distribution during * create.

Use the TagResource action to tag a resource after * it's created.

*/ inline CreateDistributionRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The tag keys and optional values to add to the distribution during * create.

Use the TagResource action to tag a resource after * it's created.

*/ inline CreateDistributionRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The tag keys and optional values to add to the distribution during * create.

Use the TagResource action to tag a resource after * it's created.

*/ inline CreateDistributionRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_distributionName; bool m_distributionNameHasBeenSet = false; InputOrigin m_origin; bool m_originHasBeenSet = false; CacheBehavior m_defaultCacheBehavior; bool m_defaultCacheBehaviorHasBeenSet = false; CacheSettings m_cacheBehaviorSettings; bool m_cacheBehaviorSettingsHasBeenSet = false; Aws::Vector m_cacheBehaviors; bool m_cacheBehaviorsHasBeenSet = false; Aws::String m_bundleId; bool m_bundleIdHasBeenSet = false; IpAddressType m_ipAddressType; bool m_ipAddressTypeHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws