/** * 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 namespace Aws { namespace Lightsail { namespace Model { /** */ class UpdateDistributionRequest : public LightsailRequest { public: AWS_LIGHTSAIL_API UpdateDistributionRequest(); // 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 "UpdateDistribution"; } AWS_LIGHTSAIL_API Aws::String SerializePayload() const override; AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the distribution to update.

Use the * GetDistributions action to get a list of distribution names that * you can specify.

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

The name of the distribution to update.

Use the * GetDistributions action to get a list of distribution names that * you can specify.

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

The name of the distribution to update.

Use the * GetDistributions action to get a list of distribution names that * you can specify.

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

The name of the distribution to update.

Use the * GetDistributions action to get a list of distribution names that * you can specify.

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

The name of the distribution to update.

Use the * GetDistributions action to get a list of distribution names that * you can specify.

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

The name of the distribution to update.

Use the * GetDistributions action to get a list of distribution names that * you can specify.

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

The name of the distribution to update.

Use the * GetDistributions action to get a list of distribution names that * you can specify.

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

The name of the distribution to update.

Use the * GetDistributions action to get a list of distribution names that * you can specify.

*/ inline UpdateDistributionRequest& 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 UpdateDistributionRequest& 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 UpdateDistributionRequest& 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 UpdateDistributionRequest& WithDefaultCacheBehavior(const CacheBehavior& value) { SetDefaultCacheBehavior(value); return *this;} /** *

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

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

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

The cacheBehaviorSettings specified in * your UpdateDistributionRequest will replace your distribution's * existing settings.

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

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

The cacheBehaviorSettings specified in * your UpdateDistributionRequest will replace your distribution's * existing settings.

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

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

The cacheBehaviorSettings specified in * your UpdateDistributionRequest will replace your distribution's * existing settings.

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

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

The cacheBehaviorSettings specified in * your UpdateDistributionRequest will replace your distribution's * existing settings.

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

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

The cacheBehaviorSettings specified in * your UpdateDistributionRequest will replace your distribution's * existing settings.

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

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

The cacheBehaviorSettings specified in * your UpdateDistributionRequest will replace your distribution's * existing settings.

*/ inline UpdateDistributionRequest& 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 UpdateDistributionRequest& WithCacheBehaviors(const Aws::Vector& value) { SetCacheBehaviors(value); return *this;} /** *

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

*/ inline UpdateDistributionRequest& 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 UpdateDistributionRequest& 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 UpdateDistributionRequest& AddCacheBehaviors(CacheBehaviorPerPath&& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors.push_back(std::move(value)); return *this; } /** *

Indicates whether to enable the distribution.

*/ inline bool GetIsEnabled() const{ return m_isEnabled; } /** *

Indicates whether to enable the distribution.

*/ inline bool IsEnabledHasBeenSet() const { return m_isEnabledHasBeenSet; } /** *

Indicates whether to enable the distribution.

*/ inline void SetIsEnabled(bool value) { m_isEnabledHasBeenSet = true; m_isEnabled = value; } /** *

Indicates whether to enable the distribution.

*/ inline UpdateDistributionRequest& WithIsEnabled(bool value) { SetIsEnabled(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; bool m_isEnabled; bool m_isEnabledHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws