module Stratosphere.GameLift.GameSessionQueue.FilterConfigurationProperty (
        FilterConfigurationProperty(..), mkFilterConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FilterConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gamesessionqueue-filterconfiguration.html>
    FilterConfigurationProperty {FilterConfigurationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gamesessionqueue-filterconfiguration.html#cfn-gamelift-gamesessionqueue-filterconfiguration-allowedlocations>
                                 FilterConfigurationProperty -> Maybe (ValueList Text)
allowedLocations :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (FilterConfigurationProperty -> FilterConfigurationProperty -> Bool
(FilterConfigurationProperty
 -> FilterConfigurationProperty -> Bool)
-> (FilterConfigurationProperty
    -> FilterConfigurationProperty -> Bool)
-> Eq FilterConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FilterConfigurationProperty -> FilterConfigurationProperty -> Bool
== :: FilterConfigurationProperty -> FilterConfigurationProperty -> Bool
$c/= :: FilterConfigurationProperty -> FilterConfigurationProperty -> Bool
/= :: FilterConfigurationProperty -> FilterConfigurationProperty -> Bool
Prelude.Eq, Int -> FilterConfigurationProperty -> ShowS
[FilterConfigurationProperty] -> ShowS
FilterConfigurationProperty -> String
(Int -> FilterConfigurationProperty -> ShowS)
-> (FilterConfigurationProperty -> String)
-> ([FilterConfigurationProperty] -> ShowS)
-> Show FilterConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FilterConfigurationProperty -> ShowS
showsPrec :: Int -> FilterConfigurationProperty -> ShowS
$cshow :: FilterConfigurationProperty -> String
show :: FilterConfigurationProperty -> String
$cshowList :: [FilterConfigurationProperty] -> ShowS
showList :: [FilterConfigurationProperty] -> ShowS
Prelude.Show)
mkFilterConfigurationProperty :: FilterConfigurationProperty
mkFilterConfigurationProperty :: FilterConfigurationProperty
mkFilterConfigurationProperty
  = FilterConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), allowedLocations :: Maybe (ValueList Text)
allowedLocations = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FilterConfigurationProperty where
  toResourceProperties :: FilterConfigurationProperty -> ResourceProperties
toResourceProperties FilterConfigurationProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: FilterConfigurationProperty -> ()
allowedLocations :: FilterConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
allowedLocations :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GameLift::GameSessionQueue.FilterConfiguration",
         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 -> 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
"AllowedLocations" (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)
allowedLocations])}
instance JSON.ToJSON FilterConfigurationProperty where
  toJSON :: FilterConfigurationProperty -> Value
toJSON FilterConfigurationProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: FilterConfigurationProperty -> ()
allowedLocations :: FilterConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
allowedLocations :: Maybe (ValueList Text)
..}
    = [(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 -> 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
"AllowedLocations" (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)
allowedLocations]))
instance Property "AllowedLocations" FilterConfigurationProperty where
  type PropertyType "AllowedLocations" FilterConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "AllowedLocations" FilterConfigurationProperty
-> FilterConfigurationProperty -> FilterConfigurationProperty
set PropertyType "AllowedLocations" FilterConfigurationProperty
newValue FilterConfigurationProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: FilterConfigurationProperty -> ()
allowedLocations :: FilterConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
allowedLocations :: Maybe (ValueList Text)
..}
    = FilterConfigurationProperty
        {allowedLocations :: Maybe (ValueList Text)
allowedLocations = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AllowedLocations" FilterConfigurationProperty
ValueList Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}