module Stratosphere.ElasticLoadBalancingV2.ListenerRule.QueryStringConfigProperty (
        module Exports, QueryStringConfigProperty(..),
        mkQueryStringConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ElasticLoadBalancingV2.ListenerRule.QueryStringKeyValueProperty as Exports
import Stratosphere.ResourceProperties
data QueryStringConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-querystringconfig.html>
    QueryStringConfigProperty {QueryStringConfigProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-querystringconfig.html#cfn-elasticloadbalancingv2-listenerrule-querystringconfig-values>
                               QueryStringConfigProperty -> Maybe [QueryStringKeyValueProperty]
values :: (Prelude.Maybe [QueryStringKeyValueProperty])}
  deriving stock (QueryStringConfigProperty -> QueryStringConfigProperty -> Bool
(QueryStringConfigProperty -> QueryStringConfigProperty -> Bool)
-> (QueryStringConfigProperty -> QueryStringConfigProperty -> Bool)
-> Eq QueryStringConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: QueryStringConfigProperty -> QueryStringConfigProperty -> Bool
== :: QueryStringConfigProperty -> QueryStringConfigProperty -> Bool
$c/= :: QueryStringConfigProperty -> QueryStringConfigProperty -> Bool
/= :: QueryStringConfigProperty -> QueryStringConfigProperty -> Bool
Prelude.Eq, Int -> QueryStringConfigProperty -> ShowS
[QueryStringConfigProperty] -> ShowS
QueryStringConfigProperty -> String
(Int -> QueryStringConfigProperty -> ShowS)
-> (QueryStringConfigProperty -> String)
-> ([QueryStringConfigProperty] -> ShowS)
-> Show QueryStringConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryStringConfigProperty -> ShowS
showsPrec :: Int -> QueryStringConfigProperty -> ShowS
$cshow :: QueryStringConfigProperty -> String
show :: QueryStringConfigProperty -> String
$cshowList :: [QueryStringConfigProperty] -> ShowS
showList :: [QueryStringConfigProperty] -> ShowS
Prelude.Show)
mkQueryStringConfigProperty :: QueryStringConfigProperty
mkQueryStringConfigProperty :: QueryStringConfigProperty
mkQueryStringConfigProperty
  = QueryStringConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), values :: Maybe [QueryStringKeyValueProperty]
values = Maybe [QueryStringKeyValueProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties QueryStringConfigProperty where
  toResourceProperties :: QueryStringConfigProperty -> ResourceProperties
toResourceProperties QueryStringConfigProperty {Maybe [QueryStringKeyValueProperty]
()
haddock_workaround_ :: QueryStringConfigProperty -> ()
values :: QueryStringConfigProperty -> Maybe [QueryStringKeyValueProperty]
haddock_workaround_ :: ()
values :: Maybe [QueryStringKeyValueProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ElasticLoadBalancingV2::ListenerRule.QueryStringConfig",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [QueryStringKeyValueProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Values" ([QueryStringKeyValueProperty] -> (Key, Value))
-> Maybe [QueryStringKeyValueProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [QueryStringKeyValueProperty]
values])}
instance JSON.ToJSON QueryStringConfigProperty where
  toJSON :: QueryStringConfigProperty -> Value
toJSON QueryStringConfigProperty {Maybe [QueryStringKeyValueProperty]
()
haddock_workaround_ :: QueryStringConfigProperty -> ()
values :: QueryStringConfigProperty -> Maybe [QueryStringKeyValueProperty]
haddock_workaround_ :: ()
values :: Maybe [QueryStringKeyValueProperty]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [QueryStringKeyValueProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Values" ([QueryStringKeyValueProperty] -> (Key, Value))
-> Maybe [QueryStringKeyValueProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [QueryStringKeyValueProperty]
values]))
instance Property "Values" QueryStringConfigProperty where
  type PropertyType "Values" QueryStringConfigProperty = [QueryStringKeyValueProperty]
  set :: PropertyType "Values" QueryStringConfigProperty
-> QueryStringConfigProperty -> QueryStringConfigProperty
set PropertyType "Values" QueryStringConfigProperty
newValue QueryStringConfigProperty {Maybe [QueryStringKeyValueProperty]
()
haddock_workaround_ :: QueryStringConfigProperty -> ()
values :: QueryStringConfigProperty -> Maybe [QueryStringKeyValueProperty]
haddock_workaround_ :: ()
values :: Maybe [QueryStringKeyValueProperty]
..}
    = QueryStringConfigProperty {values :: Maybe [QueryStringKeyValueProperty]
values = [QueryStringKeyValueProperty]
-> Maybe [QueryStringKeyValueProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [QueryStringKeyValueProperty]
PropertyType "Values" QueryStringConfigProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}