module Stratosphere.CloudFront.Distribution.CustomOriginConfigProperty ( CustomOriginConfigProperty(..), mkCustomOriginConfigProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data CustomOriginConfigProperty = -- | See: CustomOriginConfigProperty {haddock_workaround_ :: (), -- | See: hTTPPort :: (Prelude.Maybe (Value Prelude.Integer)), -- | See: hTTPSPort :: (Prelude.Maybe (Value Prelude.Integer)), -- | See: ipAddressType :: (Prelude.Maybe (Value Prelude.Text)), -- | See: originKeepaliveTimeout :: (Prelude.Maybe (Value Prelude.Integer)), -- | See: originProtocolPolicy :: (Value Prelude.Text), -- | See: originReadTimeout :: (Prelude.Maybe (Value Prelude.Integer)), -- | See: originSSLProtocols :: (Prelude.Maybe (ValueList Prelude.Text))} deriving stock (Prelude.Eq, Prelude.Show) mkCustomOriginConfigProperty :: Value Prelude.Text -> CustomOriginConfigProperty mkCustomOriginConfigProperty originProtocolPolicy = CustomOriginConfigProperty {haddock_workaround_ = (), originProtocolPolicy = originProtocolPolicy, hTTPPort = Prelude.Nothing, hTTPSPort = Prelude.Nothing, ipAddressType = Prelude.Nothing, originKeepaliveTimeout = Prelude.Nothing, originReadTimeout = Prelude.Nothing, originSSLProtocols = Prelude.Nothing} instance ToResourceProperties CustomOriginConfigProperty where toResourceProperties CustomOriginConfigProperty {..} = ResourceProperties {awsType = "AWS::CloudFront::Distribution.CustomOriginConfig", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["OriginProtocolPolicy" JSON..= originProtocolPolicy] (Prelude.catMaybes [(JSON..=) "HTTPPort" Prelude.<$> hTTPPort, (JSON..=) "HTTPSPort" Prelude.<$> hTTPSPort, (JSON..=) "IpAddressType" Prelude.<$> ipAddressType, (JSON..=) "OriginKeepaliveTimeout" Prelude.<$> originKeepaliveTimeout, (JSON..=) "OriginReadTimeout" Prelude.<$> originReadTimeout, (JSON..=) "OriginSSLProtocols" Prelude.<$> originSSLProtocols]))} instance JSON.ToJSON CustomOriginConfigProperty where toJSON CustomOriginConfigProperty {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["OriginProtocolPolicy" JSON..= originProtocolPolicy] (Prelude.catMaybes [(JSON..=) "HTTPPort" Prelude.<$> hTTPPort, (JSON..=) "HTTPSPort" Prelude.<$> hTTPSPort, (JSON..=) "IpAddressType" Prelude.<$> ipAddressType, (JSON..=) "OriginKeepaliveTimeout" Prelude.<$> originKeepaliveTimeout, (JSON..=) "OriginReadTimeout" Prelude.<$> originReadTimeout, (JSON..=) "OriginSSLProtocols" Prelude.<$> originSSLProtocols]))) instance Property "HTTPPort" CustomOriginConfigProperty where type PropertyType "HTTPPort" CustomOriginConfigProperty = Value Prelude.Integer set newValue CustomOriginConfigProperty {..} = CustomOriginConfigProperty {hTTPPort = Prelude.pure newValue, ..} instance Property "HTTPSPort" CustomOriginConfigProperty where type PropertyType "HTTPSPort" CustomOriginConfigProperty = Value Prelude.Integer set newValue CustomOriginConfigProperty {..} = CustomOriginConfigProperty {hTTPSPort = Prelude.pure newValue, ..} instance Property "IpAddressType" CustomOriginConfigProperty where type PropertyType "IpAddressType" CustomOriginConfigProperty = Value Prelude.Text set newValue CustomOriginConfigProperty {..} = CustomOriginConfigProperty {ipAddressType = Prelude.pure newValue, ..} instance Property "OriginKeepaliveTimeout" CustomOriginConfigProperty where type PropertyType "OriginKeepaliveTimeout" CustomOriginConfigProperty = Value Prelude.Integer set newValue CustomOriginConfigProperty {..} = CustomOriginConfigProperty {originKeepaliveTimeout = Prelude.pure newValue, ..} instance Property "OriginProtocolPolicy" CustomOriginConfigProperty where type PropertyType "OriginProtocolPolicy" CustomOriginConfigProperty = Value Prelude.Text set newValue CustomOriginConfigProperty {..} = CustomOriginConfigProperty {originProtocolPolicy = newValue, ..} instance Property "OriginReadTimeout" CustomOriginConfigProperty where type PropertyType "OriginReadTimeout" CustomOriginConfigProperty = Value Prelude.Integer set newValue CustomOriginConfigProperty {..} = CustomOriginConfigProperty {originReadTimeout = Prelude.pure newValue, ..} instance Property "OriginSSLProtocols" CustomOriginConfigProperty where type PropertyType "OriginSSLProtocols" CustomOriginConfigProperty = ValueList Prelude.Text set newValue CustomOriginConfigProperty {..} = CustomOriginConfigProperty {originSSLProtocols = Prelude.pure newValue, ..}