module Stratosphere.EKS.Cluster.BlockStorageProperty (
        BlockStorageProperty(..), mkBlockStorageProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BlockStorageProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-blockstorage.html>
    BlockStorageProperty {BlockStorageProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-blockstorage.html#cfn-eks-cluster-blockstorage-enabled>
                          BlockStorageProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (BlockStorageProperty -> BlockStorageProperty -> Bool
(BlockStorageProperty -> BlockStorageProperty -> Bool)
-> (BlockStorageProperty -> BlockStorageProperty -> Bool)
-> Eq BlockStorageProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BlockStorageProperty -> BlockStorageProperty -> Bool
== :: BlockStorageProperty -> BlockStorageProperty -> Bool
$c/= :: BlockStorageProperty -> BlockStorageProperty -> Bool
/= :: BlockStorageProperty -> BlockStorageProperty -> Bool
Prelude.Eq, Int -> BlockStorageProperty -> ShowS
[BlockStorageProperty] -> ShowS
BlockStorageProperty -> String
(Int -> BlockStorageProperty -> ShowS)
-> (BlockStorageProperty -> String)
-> ([BlockStorageProperty] -> ShowS)
-> Show BlockStorageProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BlockStorageProperty -> ShowS
showsPrec :: Int -> BlockStorageProperty -> ShowS
$cshow :: BlockStorageProperty -> String
show :: BlockStorageProperty -> String
$cshowList :: [BlockStorageProperty] -> ShowS
showList :: [BlockStorageProperty] -> ShowS
Prelude.Show)
mkBlockStorageProperty :: BlockStorageProperty
mkBlockStorageProperty :: BlockStorageProperty
mkBlockStorageProperty
  = BlockStorageProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BlockStorageProperty where
  toResourceProperties :: BlockStorageProperty -> ResourceProperties
toResourceProperties BlockStorageProperty {Maybe (Value Bool)
()
haddock_workaround_ :: BlockStorageProperty -> ()
enabled :: BlockStorageProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EKS::Cluster.BlockStorage",
         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 -> 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..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled])}
instance JSON.ToJSON BlockStorageProperty where
  toJSON :: BlockStorageProperty -> Value
toJSON BlockStorageProperty {Maybe (Value Bool)
()
haddock_workaround_ :: BlockStorageProperty -> ()
enabled :: BlockStorageProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
    = [(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 -> 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..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled]))
instance Property "Enabled" BlockStorageProperty where
  type PropertyType "Enabled" BlockStorageProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" BlockStorageProperty
-> BlockStorageProperty -> BlockStorageProperty
set PropertyType "Enabled" BlockStorageProperty
newValue BlockStorageProperty {Maybe (Value Bool)
()
haddock_workaround_ :: BlockStorageProperty -> ()
enabled :: BlockStorageProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
    = BlockStorageProperty {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" BlockStorageProperty
Value Bool
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}