module Stratosphere.CloudFront.Distribution.LegacyCustomOriginProperty (
        LegacyCustomOriginProperty(..), mkLegacyCustomOriginProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LegacyCustomOriginProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-legacycustomorigin.html>
    LegacyCustomOriginProperty {LegacyCustomOriginProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-legacycustomorigin.html#cfn-cloudfront-distribution-legacycustomorigin-dnsname>
                                LegacyCustomOriginProperty -> Value Text
dNSName :: (Value Prelude.Text),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-legacycustomorigin.html#cfn-cloudfront-distribution-legacycustomorigin-httpport>
                                LegacyCustomOriginProperty -> Maybe (Value Integer)
hTTPPort :: (Prelude.Maybe (Value Prelude.Integer)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-legacycustomorigin.html#cfn-cloudfront-distribution-legacycustomorigin-httpsport>
                                LegacyCustomOriginProperty -> Maybe (Value Integer)
hTTPSPort :: (Prelude.Maybe (Value Prelude.Integer)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-legacycustomorigin.html#cfn-cloudfront-distribution-legacycustomorigin-originprotocolpolicy>
                                LegacyCustomOriginProperty -> Value Text
originProtocolPolicy :: (Value Prelude.Text),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-legacycustomorigin.html#cfn-cloudfront-distribution-legacycustomorigin-originsslprotocols>
                                LegacyCustomOriginProperty -> ValueList Text
originSSLProtocols :: (ValueList Prelude.Text)}
  deriving stock (LegacyCustomOriginProperty -> LegacyCustomOriginProperty -> Bool
(LegacyCustomOriginProperty -> LegacyCustomOriginProperty -> Bool)
-> (LegacyCustomOriginProperty
    -> LegacyCustomOriginProperty -> Bool)
-> Eq LegacyCustomOriginProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LegacyCustomOriginProperty -> LegacyCustomOriginProperty -> Bool
== :: LegacyCustomOriginProperty -> LegacyCustomOriginProperty -> Bool
$c/= :: LegacyCustomOriginProperty -> LegacyCustomOriginProperty -> Bool
/= :: LegacyCustomOriginProperty -> LegacyCustomOriginProperty -> Bool
Prelude.Eq, Int -> LegacyCustomOriginProperty -> ShowS
[LegacyCustomOriginProperty] -> ShowS
LegacyCustomOriginProperty -> String
(Int -> LegacyCustomOriginProperty -> ShowS)
-> (LegacyCustomOriginProperty -> String)
-> ([LegacyCustomOriginProperty] -> ShowS)
-> Show LegacyCustomOriginProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LegacyCustomOriginProperty -> ShowS
showsPrec :: Int -> LegacyCustomOriginProperty -> ShowS
$cshow :: LegacyCustomOriginProperty -> String
show :: LegacyCustomOriginProperty -> String
$cshowList :: [LegacyCustomOriginProperty] -> ShowS
showList :: [LegacyCustomOriginProperty] -> ShowS
Prelude.Show)
mkLegacyCustomOriginProperty ::
  Value Prelude.Text
  -> Value Prelude.Text
     -> ValueList Prelude.Text -> LegacyCustomOriginProperty
mkLegacyCustomOriginProperty :: Value Text
-> Value Text -> ValueList Text -> LegacyCustomOriginProperty
mkLegacyCustomOriginProperty
  Value Text
dNSName
  Value Text
originProtocolPolicy
  ValueList Text
originSSLProtocols
  = LegacyCustomOriginProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), dNSName :: Value Text
dNSName = Value Text
dNSName,
       originProtocolPolicy :: Value Text
originProtocolPolicy = Value Text
originProtocolPolicy,
       originSSLProtocols :: ValueList Text
originSSLProtocols = ValueList Text
originSSLProtocols,
       hTTPPort :: Maybe (Value Integer)
hTTPPort = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, hTTPSPort :: Maybe (Value Integer)
hTTPSPort = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LegacyCustomOriginProperty where
  toResourceProperties :: LegacyCustomOriginProperty -> ResourceProperties
toResourceProperties LegacyCustomOriginProperty {Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: LegacyCustomOriginProperty -> ()
dNSName :: LegacyCustomOriginProperty -> Value Text
hTTPPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
hTTPSPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
originProtocolPolicy :: LegacyCustomOriginProperty -> Value Text
originSSLProtocols :: LegacyCustomOriginProperty -> ValueList Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFront::Distribution.LegacyCustomOrigin",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"DNSName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
dNSName,
                            Key
"OriginProtocolPolicy" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
originProtocolPolicy,
                            Key
"OriginSSLProtocols" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
originSSLProtocols]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HTTPPort" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
hTTPPort,
                               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HTTPSPort" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
hTTPSPort]))}
instance JSON.ToJSON LegacyCustomOriginProperty where
  toJSON :: LegacyCustomOriginProperty -> Value
toJSON LegacyCustomOriginProperty {Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: LegacyCustomOriginProperty -> ()
dNSName :: LegacyCustomOriginProperty -> Value Text
hTTPPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
hTTPSPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
originProtocolPolicy :: LegacyCustomOriginProperty -> Value Text
originSSLProtocols :: LegacyCustomOriginProperty -> ValueList Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"DNSName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
dNSName,
               Key
"OriginProtocolPolicy" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
originProtocolPolicy,
               Key
"OriginSSLProtocols" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
originSSLProtocols]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HTTPPort" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
hTTPPort,
                  Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HTTPSPort" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
hTTPSPort])))
instance Property "DNSName" LegacyCustomOriginProperty where
  type PropertyType "DNSName" LegacyCustomOriginProperty = Value Prelude.Text
  set :: PropertyType "DNSName" LegacyCustomOriginProperty
-> LegacyCustomOriginProperty -> LegacyCustomOriginProperty
set PropertyType "DNSName" LegacyCustomOriginProperty
newValue LegacyCustomOriginProperty {Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: LegacyCustomOriginProperty -> ()
dNSName :: LegacyCustomOriginProperty -> Value Text
hTTPPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
hTTPSPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
originProtocolPolicy :: LegacyCustomOriginProperty -> Value Text
originSSLProtocols :: LegacyCustomOriginProperty -> ValueList Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
..}
    = LegacyCustomOriginProperty {dNSName :: Value Text
dNSName = PropertyType "DNSName" LegacyCustomOriginProperty
Value Text
newValue, Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
haddock_workaround_ :: ()
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
..}
instance Property "HTTPPort" LegacyCustomOriginProperty where
  type PropertyType "HTTPPort" LegacyCustomOriginProperty = Value Prelude.Integer
  set :: PropertyType "HTTPPort" LegacyCustomOriginProperty
-> LegacyCustomOriginProperty -> LegacyCustomOriginProperty
set PropertyType "HTTPPort" LegacyCustomOriginProperty
newValue LegacyCustomOriginProperty {Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: LegacyCustomOriginProperty -> ()
dNSName :: LegacyCustomOriginProperty -> Value Text
hTTPPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
hTTPSPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
originProtocolPolicy :: LegacyCustomOriginProperty -> Value Text
originSSLProtocols :: LegacyCustomOriginProperty -> ValueList Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
..}
    = LegacyCustomOriginProperty {hTTPPort :: Maybe (Value Integer)
hTTPPort = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HTTPPort" LegacyCustomOriginProperty
Value Integer
newValue, Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
..}
instance Property "HTTPSPort" LegacyCustomOriginProperty where
  type PropertyType "HTTPSPort" LegacyCustomOriginProperty = Value Prelude.Integer
  set :: PropertyType "HTTPSPort" LegacyCustomOriginProperty
-> LegacyCustomOriginProperty -> LegacyCustomOriginProperty
set PropertyType "HTTPSPort" LegacyCustomOriginProperty
newValue LegacyCustomOriginProperty {Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: LegacyCustomOriginProperty -> ()
dNSName :: LegacyCustomOriginProperty -> Value Text
hTTPPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
hTTPSPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
originProtocolPolicy :: LegacyCustomOriginProperty -> Value Text
originSSLProtocols :: LegacyCustomOriginProperty -> ValueList Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
..}
    = LegacyCustomOriginProperty
        {hTTPSPort :: Maybe (Value Integer)
hTTPSPort = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HTTPSPort" LegacyCustomOriginProperty
Value Integer
newValue, Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
..}
instance Property "OriginProtocolPolicy" LegacyCustomOriginProperty where
  type PropertyType "OriginProtocolPolicy" LegacyCustomOriginProperty = Value Prelude.Text
  set :: PropertyType "OriginProtocolPolicy" LegacyCustomOriginProperty
-> LegacyCustomOriginProperty -> LegacyCustomOriginProperty
set PropertyType "OriginProtocolPolicy" LegacyCustomOriginProperty
newValue LegacyCustomOriginProperty {Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: LegacyCustomOriginProperty -> ()
dNSName :: LegacyCustomOriginProperty -> Value Text
hTTPPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
hTTPSPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
originProtocolPolicy :: LegacyCustomOriginProperty -> Value Text
originSSLProtocols :: LegacyCustomOriginProperty -> ValueList Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
..}
    = LegacyCustomOriginProperty {originProtocolPolicy :: Value Text
originProtocolPolicy = PropertyType "OriginProtocolPolicy" LegacyCustomOriginProperty
Value Text
newValue, Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originSSLProtocols :: ValueList Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originSSLProtocols :: ValueList Text
..}
instance Property "OriginSSLProtocols" LegacyCustomOriginProperty where
  type PropertyType "OriginSSLProtocols" LegacyCustomOriginProperty = ValueList Prelude.Text
  set :: PropertyType "OriginSSLProtocols" LegacyCustomOriginProperty
-> LegacyCustomOriginProperty -> LegacyCustomOriginProperty
set PropertyType "OriginSSLProtocols" LegacyCustomOriginProperty
newValue LegacyCustomOriginProperty {Maybe (Value Integer)
()
ValueList Text
Value Text
haddock_workaround_ :: LegacyCustomOriginProperty -> ()
dNSName :: LegacyCustomOriginProperty -> Value Text
hTTPPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
hTTPSPort :: LegacyCustomOriginProperty -> Maybe (Value Integer)
originProtocolPolicy :: LegacyCustomOriginProperty -> Value Text
originSSLProtocols :: LegacyCustomOriginProperty -> ValueList Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
originSSLProtocols :: ValueList Text
..}
    = LegacyCustomOriginProperty {originSSLProtocols :: ValueList Text
originSSLProtocols = PropertyType "OriginSSLProtocols" LegacyCustomOriginProperty
ValueList Text
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
haddock_workaround_ :: ()
dNSName :: Value Text
hTTPPort :: Maybe (Value Integer)
hTTPSPort :: Maybe (Value Integer)
originProtocolPolicy :: Value Text
..}