module Stratosphere.CloudFront.CachePolicy (
        module Exports, CachePolicy(..), mkCachePolicy
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CloudFront.CachePolicy.CachePolicyConfigProperty as Exports
import Stratosphere.ResourceProperties
data CachePolicy
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html>
    CachePolicy {CachePolicy -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html#cfn-cloudfront-cachepolicy-cachepolicyconfig>
                 CachePolicy -> CachePolicyConfigProperty
cachePolicyConfig :: CachePolicyConfigProperty}
  deriving stock (CachePolicy -> CachePolicy -> Bool
(CachePolicy -> CachePolicy -> Bool)
-> (CachePolicy -> CachePolicy -> Bool) -> Eq CachePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CachePolicy -> CachePolicy -> Bool
== :: CachePolicy -> CachePolicy -> Bool
$c/= :: CachePolicy -> CachePolicy -> Bool
/= :: CachePolicy -> CachePolicy -> Bool
Prelude.Eq, Int -> CachePolicy -> ShowS
[CachePolicy] -> ShowS
CachePolicy -> String
(Int -> CachePolicy -> ShowS)
-> (CachePolicy -> String)
-> ([CachePolicy] -> ShowS)
-> Show CachePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CachePolicy -> ShowS
showsPrec :: Int -> CachePolicy -> ShowS
$cshow :: CachePolicy -> String
show :: CachePolicy -> String
$cshowList :: [CachePolicy] -> ShowS
showList :: [CachePolicy] -> ShowS
Prelude.Show)
mkCachePolicy :: CachePolicyConfigProperty -> CachePolicy
mkCachePolicy :: CachePolicyConfigProperty -> CachePolicy
mkCachePolicy CachePolicyConfigProperty
cachePolicyConfig
  = CachePolicy
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cachePolicyConfig :: CachePolicyConfigProperty
cachePolicyConfig = CachePolicyConfigProperty
cachePolicyConfig}
instance ToResourceProperties CachePolicy where
  toResourceProperties :: CachePolicy -> ResourceProperties
toResourceProperties CachePolicy {()
CachePolicyConfigProperty
haddock_workaround_ :: CachePolicy -> ()
cachePolicyConfig :: CachePolicy -> CachePolicyConfigProperty
haddock_workaround_ :: ()
cachePolicyConfig :: CachePolicyConfigProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFront::CachePolicy",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"CachePolicyConfig" Key -> CachePolicyConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= CachePolicyConfigProperty
cachePolicyConfig]}
instance JSON.ToJSON CachePolicy where
  toJSON :: CachePolicy -> Value
toJSON CachePolicy {()
CachePolicyConfigProperty
haddock_workaround_ :: CachePolicy -> ()
cachePolicyConfig :: CachePolicy -> CachePolicyConfigProperty
haddock_workaround_ :: ()
cachePolicyConfig :: CachePolicyConfigProperty
..}
    = [(Key, Value)] -> Value
JSON.object [Key
"CachePolicyConfig" Key -> CachePolicyConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= CachePolicyConfigProperty
cachePolicyConfig]
instance Property "CachePolicyConfig" CachePolicy where
  type PropertyType "CachePolicyConfig" CachePolicy = CachePolicyConfigProperty
  set :: PropertyType "CachePolicyConfig" CachePolicy
-> CachePolicy -> CachePolicy
set PropertyType "CachePolicyConfig" CachePolicy
newValue CachePolicy {()
CachePolicyConfigProperty
haddock_workaround_ :: CachePolicy -> ()
cachePolicyConfig :: CachePolicy -> CachePolicyConfigProperty
haddock_workaround_ :: ()
cachePolicyConfig :: CachePolicyConfigProperty
..}
    = CachePolicy {cachePolicyConfig :: CachePolicyConfigProperty
cachePolicyConfig = PropertyType "CachePolicyConfig" CachePolicy
CachePolicyConfigProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}