module Stratosphere.FSx.FileSystem.DataReadCacheConfigurationProperty (
        DataReadCacheConfigurationProperty(..),
        mkDataReadCacheConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DataReadCacheConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration-datareadcacheconfiguration.html>
    DataReadCacheConfigurationProperty {DataReadCacheConfigurationProperty -> ()
haddock_workaround_ :: (),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration-datareadcacheconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-datareadcacheconfiguration-sizegib>
                                        DataReadCacheConfigurationProperty -> Maybe (Value Integer)
sizeGiB :: (Prelude.Maybe (Value Prelude.Integer)),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration-datareadcacheconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-datareadcacheconfiguration-sizingmode>
                                        DataReadCacheConfigurationProperty -> Maybe (Value Text)
sizingMode :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DataReadCacheConfigurationProperty
-> DataReadCacheConfigurationProperty -> Bool
(DataReadCacheConfigurationProperty
 -> DataReadCacheConfigurationProperty -> Bool)
-> (DataReadCacheConfigurationProperty
    -> DataReadCacheConfigurationProperty -> Bool)
-> Eq DataReadCacheConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataReadCacheConfigurationProperty
-> DataReadCacheConfigurationProperty -> Bool
== :: DataReadCacheConfigurationProperty
-> DataReadCacheConfigurationProperty -> Bool
$c/= :: DataReadCacheConfigurationProperty
-> DataReadCacheConfigurationProperty -> Bool
/= :: DataReadCacheConfigurationProperty
-> DataReadCacheConfigurationProperty -> Bool
Prelude.Eq, Int -> DataReadCacheConfigurationProperty -> ShowS
[DataReadCacheConfigurationProperty] -> ShowS
DataReadCacheConfigurationProperty -> String
(Int -> DataReadCacheConfigurationProperty -> ShowS)
-> (DataReadCacheConfigurationProperty -> String)
-> ([DataReadCacheConfigurationProperty] -> ShowS)
-> Show DataReadCacheConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataReadCacheConfigurationProperty -> ShowS
showsPrec :: Int -> DataReadCacheConfigurationProperty -> ShowS
$cshow :: DataReadCacheConfigurationProperty -> String
show :: DataReadCacheConfigurationProperty -> String
$cshowList :: [DataReadCacheConfigurationProperty] -> ShowS
showList :: [DataReadCacheConfigurationProperty] -> ShowS
Prelude.Show)
mkDataReadCacheConfigurationProperty ::
  DataReadCacheConfigurationProperty
mkDataReadCacheConfigurationProperty :: DataReadCacheConfigurationProperty
mkDataReadCacheConfigurationProperty
  = DataReadCacheConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), sizeGiB :: Maybe (Value Integer)
sizeGiB = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       sizingMode :: Maybe (Value Text)
sizingMode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DataReadCacheConfigurationProperty where
  toResourceProperties :: DataReadCacheConfigurationProperty -> ResourceProperties
toResourceProperties DataReadCacheConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DataReadCacheConfigurationProperty -> ()
sizeGiB :: DataReadCacheConfigurationProperty -> Maybe (Value Integer)
sizingMode :: DataReadCacheConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
sizingMode :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::FSx::FileSystem.DataReadCacheConfiguration",
         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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SizeGiB" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
sizeGiB,
                            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..=) Key
"SizingMode" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
sizingMode])}
instance JSON.ToJSON DataReadCacheConfigurationProperty where
  toJSON :: DataReadCacheConfigurationProperty -> Value
toJSON DataReadCacheConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DataReadCacheConfigurationProperty -> ()
sizeGiB :: DataReadCacheConfigurationProperty -> Maybe (Value Integer)
sizingMode :: DataReadCacheConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
sizingMode :: Maybe (Value 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 -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SizeGiB" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
sizeGiB,
               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..=) Key
"SizingMode" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
sizingMode]))
instance Property "SizeGiB" DataReadCacheConfigurationProperty where
  type PropertyType "SizeGiB" DataReadCacheConfigurationProperty = Value Prelude.Integer
  set :: PropertyType "SizeGiB" DataReadCacheConfigurationProperty
-> DataReadCacheConfigurationProperty
-> DataReadCacheConfigurationProperty
set PropertyType "SizeGiB" DataReadCacheConfigurationProperty
newValue DataReadCacheConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DataReadCacheConfigurationProperty -> ()
sizeGiB :: DataReadCacheConfigurationProperty -> Maybe (Value Integer)
sizingMode :: DataReadCacheConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
sizingMode :: Maybe (Value Text)
..}
    = DataReadCacheConfigurationProperty
        {sizeGiB :: Maybe (Value Integer)
sizeGiB = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SizeGiB" DataReadCacheConfigurationProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
sizingMode :: Maybe (Value Text)
haddock_workaround_ :: ()
sizingMode :: Maybe (Value Text)
..}
instance Property "SizingMode" DataReadCacheConfigurationProperty where
  type PropertyType "SizingMode" DataReadCacheConfigurationProperty = Value Prelude.Text
  set :: PropertyType "SizingMode" DataReadCacheConfigurationProperty
-> DataReadCacheConfigurationProperty
-> DataReadCacheConfigurationProperty
set PropertyType "SizingMode" DataReadCacheConfigurationProperty
newValue DataReadCacheConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DataReadCacheConfigurationProperty -> ()
sizeGiB :: DataReadCacheConfigurationProperty -> Maybe (Value Integer)
sizingMode :: DataReadCacheConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
sizingMode :: Maybe (Value Text)
..}
    = DataReadCacheConfigurationProperty
        {sizingMode :: Maybe (Value Text)
sizingMode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SizingMode" DataReadCacheConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
..}