/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Lightsail { namespace Model { /** *

Describes the origin resource of an Amazon Lightsail content delivery network * (CDN) distribution.

An origin can be a Lightsail instance, bucket, or * load balancer. A distribution pulls content from an origin, caches it, and * serves it to viewers via a worldwide network of edge servers.

See * Also:

AWS * API Reference

*/ class Origin { public: AWS_LIGHTSAIL_API Origin(); AWS_LIGHTSAIL_API Origin(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API Origin& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the origin resource.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the origin resource.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the origin resource.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the origin resource.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the origin resource.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the origin resource.

*/ inline Origin& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the origin resource.

*/ inline Origin& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the origin resource.

*/ inline Origin& WithName(const char* value) { SetName(value); return *this;} /** *

The resource type of the origin resource (e.g., Instance).

*/ inline const ResourceType& GetResourceType() const{ return m_resourceType; } /** *

The resource type of the origin resource (e.g., Instance).

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The resource type of the origin resource (e.g., Instance).

*/ inline void SetResourceType(const ResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The resource type of the origin resource (e.g., Instance).

*/ inline void SetResourceType(ResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The resource type of the origin resource (e.g., Instance).

*/ inline Origin& WithResourceType(const ResourceType& value) { SetResourceType(value); return *this;} /** *

The resource type of the origin resource (e.g., Instance).

*/ inline Origin& WithResourceType(ResourceType&& value) { SetResourceType(std::move(value)); return *this;} /** *

The AWS Region name of the origin resource.

*/ inline const RegionName& GetRegionName() const{ return m_regionName; } /** *

The AWS Region name of the origin resource.

*/ inline bool RegionNameHasBeenSet() const { return m_regionNameHasBeenSet; } /** *

The AWS Region name of the origin resource.

*/ inline void SetRegionName(const RegionName& value) { m_regionNameHasBeenSet = true; m_regionName = value; } /** *

The AWS Region name of the origin resource.

*/ inline void SetRegionName(RegionName&& value) { m_regionNameHasBeenSet = true; m_regionName = std::move(value); } /** *

The AWS Region name of the origin resource.

*/ inline Origin& WithRegionName(const RegionName& value) { SetRegionName(value); return *this;} /** *

The AWS Region name of the origin resource.

*/ inline Origin& WithRegionName(RegionName&& value) { SetRegionName(std::move(value)); return *this;} /** *

The protocol that your Amazon Lightsail distribution uses when establishing a * connection with your origin to pull content.

*/ inline const OriginProtocolPolicyEnum& GetProtocolPolicy() const{ return m_protocolPolicy; } /** *

The protocol that your Amazon Lightsail distribution uses when establishing a * connection with your origin to pull content.

*/ inline bool ProtocolPolicyHasBeenSet() const { return m_protocolPolicyHasBeenSet; } /** *

The protocol that your Amazon Lightsail distribution uses when establishing a * connection with your origin to pull content.

*/ inline void SetProtocolPolicy(const OriginProtocolPolicyEnum& value) { m_protocolPolicyHasBeenSet = true; m_protocolPolicy = value; } /** *

The protocol that your Amazon Lightsail distribution uses when establishing a * connection with your origin to pull content.

*/ inline void SetProtocolPolicy(OriginProtocolPolicyEnum&& value) { m_protocolPolicyHasBeenSet = true; m_protocolPolicy = std::move(value); } /** *

The protocol that your Amazon Lightsail distribution uses when establishing a * connection with your origin to pull content.

*/ inline Origin& WithProtocolPolicy(const OriginProtocolPolicyEnum& value) { SetProtocolPolicy(value); return *this;} /** *

The protocol that your Amazon Lightsail distribution uses when establishing a * connection with your origin to pull content.

*/ inline Origin& WithProtocolPolicy(OriginProtocolPolicyEnum&& value) { SetProtocolPolicy(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; ResourceType m_resourceType; bool m_resourceTypeHasBeenSet = false; RegionName m_regionName; bool m_regionNameHasBeenSet = false; OriginProtocolPolicyEnum m_protocolPolicy; bool m_protocolPolicyHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws