module Stratosphere.CloudFront.Distribution.ForwardedValuesProperty (
        module Exports, ForwardedValuesProperty(..),
        mkForwardedValuesProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CloudFront.Distribution.CookiesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ForwardedValuesProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-forwardedvalues.html>
    ForwardedValuesProperty {ForwardedValuesProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-forwardedvalues.html#cfn-cloudfront-distribution-forwardedvalues-cookies>
                             ForwardedValuesProperty -> Maybe CookiesProperty
cookies :: (Prelude.Maybe CookiesProperty),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-forwardedvalues.html#cfn-cloudfront-distribution-forwardedvalues-headers>
                             ForwardedValuesProperty -> Maybe (ValueList Text)
headers :: (Prelude.Maybe (ValueList Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-forwardedvalues.html#cfn-cloudfront-distribution-forwardedvalues-querystring>
                             ForwardedValuesProperty -> Value Bool
queryString :: (Value Prelude.Bool),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-forwardedvalues.html#cfn-cloudfront-distribution-forwardedvalues-querystringcachekeys>
                             ForwardedValuesProperty -> Maybe (ValueList Text)
queryStringCacheKeys :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (ForwardedValuesProperty -> ForwardedValuesProperty -> Bool
(ForwardedValuesProperty -> ForwardedValuesProperty -> Bool)
-> (ForwardedValuesProperty -> ForwardedValuesProperty -> Bool)
-> Eq ForwardedValuesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ForwardedValuesProperty -> ForwardedValuesProperty -> Bool
== :: ForwardedValuesProperty -> ForwardedValuesProperty -> Bool
$c/= :: ForwardedValuesProperty -> ForwardedValuesProperty -> Bool
/= :: ForwardedValuesProperty -> ForwardedValuesProperty -> Bool
Prelude.Eq, Int -> ForwardedValuesProperty -> ShowS
[ForwardedValuesProperty] -> ShowS
ForwardedValuesProperty -> String
(Int -> ForwardedValuesProperty -> ShowS)
-> (ForwardedValuesProperty -> String)
-> ([ForwardedValuesProperty] -> ShowS)
-> Show ForwardedValuesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ForwardedValuesProperty -> ShowS
showsPrec :: Int -> ForwardedValuesProperty -> ShowS
$cshow :: ForwardedValuesProperty -> String
show :: ForwardedValuesProperty -> String
$cshowList :: [ForwardedValuesProperty] -> ShowS
showList :: [ForwardedValuesProperty] -> ShowS
Prelude.Show)
mkForwardedValuesProperty ::
  Value Prelude.Bool -> ForwardedValuesProperty
mkForwardedValuesProperty :: Value Bool -> ForwardedValuesProperty
mkForwardedValuesProperty Value Bool
queryString
  = ForwardedValuesProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), queryString :: Value Bool
queryString = Value Bool
queryString,
       cookies :: Maybe CookiesProperty
cookies = Maybe CookiesProperty
forall a. Maybe a
Prelude.Nothing, headers :: Maybe (ValueList Text)
headers = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       queryStringCacheKeys :: Maybe (ValueList Text)
queryStringCacheKeys = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ForwardedValuesProperty where
  toResourceProperties :: ForwardedValuesProperty -> ResourceProperties
toResourceProperties ForwardedValuesProperty {Maybe (ValueList Text)
Maybe CookiesProperty
()
Value Bool
haddock_workaround_ :: ForwardedValuesProperty -> ()
cookies :: ForwardedValuesProperty -> Maybe CookiesProperty
headers :: ForwardedValuesProperty -> Maybe (ValueList Text)
queryString :: ForwardedValuesProperty -> Value Bool
queryStringCacheKeys :: ForwardedValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
headers :: Maybe (ValueList Text)
queryString :: Value Bool
queryStringCacheKeys :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFront::Distribution.ForwardedValues",
         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
"QueryString" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
queryString]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> CookiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Cookies" (CookiesProperty -> (Key, Value))
-> Maybe CookiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CookiesProperty
cookies,
                               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..=) Key
"Headers" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
headers,
                               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..=) Key
"QueryStringCacheKeys"
                                 (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
queryStringCacheKeys]))}
instance JSON.ToJSON ForwardedValuesProperty where
  toJSON :: ForwardedValuesProperty -> Value
toJSON ForwardedValuesProperty {Maybe (ValueList Text)
Maybe CookiesProperty
()
Value Bool
haddock_workaround_ :: ForwardedValuesProperty -> ()
cookies :: ForwardedValuesProperty -> Maybe CookiesProperty
headers :: ForwardedValuesProperty -> Maybe (ValueList Text)
queryString :: ForwardedValuesProperty -> Value Bool
queryStringCacheKeys :: ForwardedValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
headers :: Maybe (ValueList Text)
queryString :: Value Bool
queryStringCacheKeys :: Maybe (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
"QueryString" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
queryString]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> CookiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Cookies" (CookiesProperty -> (Key, Value))
-> Maybe CookiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CookiesProperty
cookies,
                  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..=) Key
"Headers" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
headers,
                  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..=) Key
"QueryStringCacheKeys"
                    (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
queryStringCacheKeys])))
instance Property "Cookies" ForwardedValuesProperty where
  type PropertyType "Cookies" ForwardedValuesProperty = CookiesProperty
  set :: PropertyType "Cookies" ForwardedValuesProperty
-> ForwardedValuesProperty -> ForwardedValuesProperty
set PropertyType "Cookies" ForwardedValuesProperty
newValue ForwardedValuesProperty {Maybe (ValueList Text)
Maybe CookiesProperty
()
Value Bool
haddock_workaround_ :: ForwardedValuesProperty -> ()
cookies :: ForwardedValuesProperty -> Maybe CookiesProperty
headers :: ForwardedValuesProperty -> Maybe (ValueList Text)
queryString :: ForwardedValuesProperty -> Value Bool
queryStringCacheKeys :: ForwardedValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
headers :: Maybe (ValueList Text)
queryString :: Value Bool
queryStringCacheKeys :: Maybe (ValueList Text)
..}
    = ForwardedValuesProperty {cookies :: Maybe CookiesProperty
cookies = CookiesProperty -> Maybe CookiesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Cookies" ForwardedValuesProperty
CookiesProperty
newValue, Maybe (ValueList Text)
()
Value Bool
haddock_workaround_ :: ()
headers :: Maybe (ValueList Text)
queryString :: Value Bool
queryStringCacheKeys :: Maybe (ValueList Text)
haddock_workaround_ :: ()
headers :: Maybe (ValueList Text)
queryString :: Value Bool
queryStringCacheKeys :: Maybe (ValueList Text)
..}
instance Property "Headers" ForwardedValuesProperty where
  type PropertyType "Headers" ForwardedValuesProperty = ValueList Prelude.Text
  set :: PropertyType "Headers" ForwardedValuesProperty
-> ForwardedValuesProperty -> ForwardedValuesProperty
set PropertyType "Headers" ForwardedValuesProperty
newValue ForwardedValuesProperty {Maybe (ValueList Text)
Maybe CookiesProperty
()
Value Bool
haddock_workaround_ :: ForwardedValuesProperty -> ()
cookies :: ForwardedValuesProperty -> Maybe CookiesProperty
headers :: ForwardedValuesProperty -> Maybe (ValueList Text)
queryString :: ForwardedValuesProperty -> Value Bool
queryStringCacheKeys :: ForwardedValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
headers :: Maybe (ValueList Text)
queryString :: Value Bool
queryStringCacheKeys :: Maybe (ValueList Text)
..}
    = ForwardedValuesProperty {headers :: Maybe (ValueList Text)
headers = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Headers" ForwardedValuesProperty
ValueList Text
newValue, Maybe (ValueList Text)
Maybe CookiesProperty
()
Value Bool
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
queryString :: Value Bool
queryStringCacheKeys :: Maybe (ValueList Text)
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
queryString :: Value Bool
queryStringCacheKeys :: Maybe (ValueList Text)
..}
instance Property "QueryString" ForwardedValuesProperty where
  type PropertyType "QueryString" ForwardedValuesProperty = Value Prelude.Bool
  set :: PropertyType "QueryString" ForwardedValuesProperty
-> ForwardedValuesProperty -> ForwardedValuesProperty
set PropertyType "QueryString" ForwardedValuesProperty
newValue ForwardedValuesProperty {Maybe (ValueList Text)
Maybe CookiesProperty
()
Value Bool
haddock_workaround_ :: ForwardedValuesProperty -> ()
cookies :: ForwardedValuesProperty -> Maybe CookiesProperty
headers :: ForwardedValuesProperty -> Maybe (ValueList Text)
queryString :: ForwardedValuesProperty -> Value Bool
queryStringCacheKeys :: ForwardedValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
headers :: Maybe (ValueList Text)
queryString :: Value Bool
queryStringCacheKeys :: Maybe (ValueList Text)
..}
    = ForwardedValuesProperty {queryString :: Value Bool
queryString = PropertyType "QueryString" ForwardedValuesProperty
Value Bool
newValue, Maybe (ValueList Text)
Maybe CookiesProperty
()
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
headers :: Maybe (ValueList Text)
queryStringCacheKeys :: Maybe (ValueList Text)
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
headers :: Maybe (ValueList Text)
queryStringCacheKeys :: Maybe (ValueList Text)
..}
instance Property "QueryStringCacheKeys" ForwardedValuesProperty where
  type PropertyType "QueryStringCacheKeys" ForwardedValuesProperty = ValueList Prelude.Text
  set :: PropertyType "QueryStringCacheKeys" ForwardedValuesProperty
-> ForwardedValuesProperty -> ForwardedValuesProperty
set PropertyType "QueryStringCacheKeys" ForwardedValuesProperty
newValue ForwardedValuesProperty {Maybe (ValueList Text)
Maybe CookiesProperty
()
Value Bool
haddock_workaround_ :: ForwardedValuesProperty -> ()
cookies :: ForwardedValuesProperty -> Maybe CookiesProperty
headers :: ForwardedValuesProperty -> Maybe (ValueList Text)
queryString :: ForwardedValuesProperty -> Value Bool
queryStringCacheKeys :: ForwardedValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
headers :: Maybe (ValueList Text)
queryString :: Value Bool
queryStringCacheKeys :: Maybe (ValueList Text)
..}
    = ForwardedValuesProperty
        {queryStringCacheKeys :: Maybe (ValueList Text)
queryStringCacheKeys = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "QueryStringCacheKeys" ForwardedValuesProperty
ValueList Text
newValue, Maybe (ValueList Text)
Maybe CookiesProperty
()
Value Bool
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
headers :: Maybe (ValueList Text)
queryString :: Value Bool
haddock_workaround_ :: ()
cookies :: Maybe CookiesProperty
headers :: Maybe (ValueList Text)
queryString :: Value Bool
..}