module Stratosphere.GameLift.Fleet.LocationConfigurationProperty (
module Exports, LocationConfigurationProperty(..),
mkLocationConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.GameLift.Fleet.LocationCapacityProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LocationConfigurationProperty
=
LocationConfigurationProperty {LocationConfigurationProperty -> ()
haddock_workaround_ :: (),
LocationConfigurationProperty -> Value Text
location :: (Value Prelude.Text),
LocationConfigurationProperty -> Maybe LocationCapacityProperty
locationCapacity :: (Prelude.Maybe LocationCapacityProperty)}
deriving stock (LocationConfigurationProperty
-> LocationConfigurationProperty -> Bool
(LocationConfigurationProperty
-> LocationConfigurationProperty -> Bool)
-> (LocationConfigurationProperty
-> LocationConfigurationProperty -> Bool)
-> Eq LocationConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LocationConfigurationProperty
-> LocationConfigurationProperty -> Bool
== :: LocationConfigurationProperty
-> LocationConfigurationProperty -> Bool
$c/= :: LocationConfigurationProperty
-> LocationConfigurationProperty -> Bool
/= :: LocationConfigurationProperty
-> LocationConfigurationProperty -> Bool
Prelude.Eq, Int -> LocationConfigurationProperty -> ShowS
[LocationConfigurationProperty] -> ShowS
LocationConfigurationProperty -> String
(Int -> LocationConfigurationProperty -> ShowS)
-> (LocationConfigurationProperty -> String)
-> ([LocationConfigurationProperty] -> ShowS)
-> Show LocationConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LocationConfigurationProperty -> ShowS
showsPrec :: Int -> LocationConfigurationProperty -> ShowS
$cshow :: LocationConfigurationProperty -> String
show :: LocationConfigurationProperty -> String
$cshowList :: [LocationConfigurationProperty] -> ShowS
showList :: [LocationConfigurationProperty] -> ShowS
Prelude.Show)
mkLocationConfigurationProperty ::
Value Prelude.Text -> LocationConfigurationProperty
mkLocationConfigurationProperty :: Value Text -> LocationConfigurationProperty
mkLocationConfigurationProperty Value Text
location
= LocationConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), location :: Value Text
location = Value Text
location,
locationCapacity :: Maybe LocationCapacityProperty
locationCapacity = Maybe LocationCapacityProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LocationConfigurationProperty where
toResourceProperties :: LocationConfigurationProperty -> ResourceProperties
toResourceProperties LocationConfigurationProperty {Maybe LocationCapacityProperty
()
Value Text
haddock_workaround_ :: LocationConfigurationProperty -> ()
location :: LocationConfigurationProperty -> Value Text
locationCapacity :: LocationConfigurationProperty -> Maybe LocationCapacityProperty
haddock_workaround_ :: ()
location :: Value Text
locationCapacity :: Maybe LocationCapacityProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::GameLift::Fleet.LocationConfiguration",
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
"Location" 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
location]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> LocationCapacityProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LocationCapacity" (LocationCapacityProperty -> (Key, Value))
-> Maybe LocationCapacityProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LocationCapacityProperty
locationCapacity]))}
instance JSON.ToJSON LocationConfigurationProperty where
toJSON :: LocationConfigurationProperty -> Value
toJSON LocationConfigurationProperty {Maybe LocationCapacityProperty
()
Value Text
haddock_workaround_ :: LocationConfigurationProperty -> ()
location :: LocationConfigurationProperty -> Value Text
locationCapacity :: LocationConfigurationProperty -> Maybe LocationCapacityProperty
haddock_workaround_ :: ()
location :: Value Text
locationCapacity :: Maybe LocationCapacityProperty
..}
= [(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
"Location" 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
location]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> LocationCapacityProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LocationCapacity" (LocationCapacityProperty -> (Key, Value))
-> Maybe LocationCapacityProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LocationCapacityProperty
locationCapacity])))
instance Property "Location" LocationConfigurationProperty where
type PropertyType "Location" LocationConfigurationProperty = Value Prelude.Text
set :: PropertyType "Location" LocationConfigurationProperty
-> LocationConfigurationProperty -> LocationConfigurationProperty
set PropertyType "Location" LocationConfigurationProperty
newValue LocationConfigurationProperty {Maybe LocationCapacityProperty
()
Value Text
haddock_workaround_ :: LocationConfigurationProperty -> ()
location :: LocationConfigurationProperty -> Value Text
locationCapacity :: LocationConfigurationProperty -> Maybe LocationCapacityProperty
haddock_workaround_ :: ()
location :: Value Text
locationCapacity :: Maybe LocationCapacityProperty
..}
= LocationConfigurationProperty {location :: Value Text
location = PropertyType "Location" LocationConfigurationProperty
Value Text
newValue, Maybe LocationCapacityProperty
()
haddock_workaround_ :: ()
locationCapacity :: Maybe LocationCapacityProperty
haddock_workaround_ :: ()
locationCapacity :: Maybe LocationCapacityProperty
..}
instance Property "LocationCapacity" LocationConfigurationProperty where
type PropertyType "LocationCapacity" LocationConfigurationProperty = LocationCapacityProperty
set :: PropertyType "LocationCapacity" LocationConfigurationProperty
-> LocationConfigurationProperty -> LocationConfigurationProperty
set PropertyType "LocationCapacity" LocationConfigurationProperty
newValue LocationConfigurationProperty {Maybe LocationCapacityProperty
()
Value Text
haddock_workaround_ :: LocationConfigurationProperty -> ()
location :: LocationConfigurationProperty -> Value Text
locationCapacity :: LocationConfigurationProperty -> Maybe LocationCapacityProperty
haddock_workaround_ :: ()
location :: Value Text
locationCapacity :: Maybe LocationCapacityProperty
..}
= LocationConfigurationProperty
{locationCapacity :: Maybe LocationCapacityProperty
locationCapacity = LocationCapacityProperty -> Maybe LocationCapacityProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LocationCapacity" LocationConfigurationProperty
LocationCapacityProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
location :: Value Text
haddock_workaround_ :: ()
location :: Value Text
..}