module Stratosphere.FSx.FileSystem.ReadCacheConfigurationProperty (
        ReadCacheConfigurationProperty(..),
        mkReadCacheConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ReadCacheConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-readcacheconfiguration.html>
    ReadCacheConfigurationProperty {ReadCacheConfigurationProperty -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-readcacheconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-readcacheconfiguration-sizegib>
                                    ReadCacheConfigurationProperty -> Maybe (Value Integer)
sizeGiB :: (Prelude.Maybe (Value Prelude.Integer)),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-readcacheconfiguration.html#cfn-fsx-filesystem-openzfsconfiguration-readcacheconfiguration-sizingmode>
                                    ReadCacheConfigurationProperty -> Maybe (Value Text)
sizingMode :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ReadCacheConfigurationProperty
-> ReadCacheConfigurationProperty -> Bool
(ReadCacheConfigurationProperty
 -> ReadCacheConfigurationProperty -> Bool)
-> (ReadCacheConfigurationProperty
    -> ReadCacheConfigurationProperty -> Bool)
-> Eq ReadCacheConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadCacheConfigurationProperty
-> ReadCacheConfigurationProperty -> Bool
== :: ReadCacheConfigurationProperty
-> ReadCacheConfigurationProperty -> Bool
$c/= :: ReadCacheConfigurationProperty
-> ReadCacheConfigurationProperty -> Bool
/= :: ReadCacheConfigurationProperty
-> ReadCacheConfigurationProperty -> Bool
Prelude.Eq, Int -> ReadCacheConfigurationProperty -> ShowS
[ReadCacheConfigurationProperty] -> ShowS
ReadCacheConfigurationProperty -> String
(Int -> ReadCacheConfigurationProperty -> ShowS)
-> (ReadCacheConfigurationProperty -> String)
-> ([ReadCacheConfigurationProperty] -> ShowS)
-> Show ReadCacheConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReadCacheConfigurationProperty -> ShowS
showsPrec :: Int -> ReadCacheConfigurationProperty -> ShowS
$cshow :: ReadCacheConfigurationProperty -> String
show :: ReadCacheConfigurationProperty -> String
$cshowList :: [ReadCacheConfigurationProperty] -> ShowS
showList :: [ReadCacheConfigurationProperty] -> ShowS
Prelude.Show)
mkReadCacheConfigurationProperty :: ReadCacheConfigurationProperty
mkReadCacheConfigurationProperty :: ReadCacheConfigurationProperty
mkReadCacheConfigurationProperty
  = ReadCacheConfigurationProperty
      {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 ReadCacheConfigurationProperty where
  toResourceProperties :: ReadCacheConfigurationProperty -> ResourceProperties
toResourceProperties ReadCacheConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ReadCacheConfigurationProperty -> ()
sizeGiB :: ReadCacheConfigurationProperty -> Maybe (Value Integer)
sizingMode :: ReadCacheConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
sizingMode :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::FSx::FileSystem.ReadCacheConfiguration",
         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 ReadCacheConfigurationProperty where
  toJSON :: ReadCacheConfigurationProperty -> Value
toJSON ReadCacheConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ReadCacheConfigurationProperty -> ()
sizeGiB :: ReadCacheConfigurationProperty -> Maybe (Value Integer)
sizingMode :: ReadCacheConfigurationProperty -> 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" ReadCacheConfigurationProperty where
  type PropertyType "SizeGiB" ReadCacheConfigurationProperty = Value Prelude.Integer
  set :: PropertyType "SizeGiB" ReadCacheConfigurationProperty
-> ReadCacheConfigurationProperty -> ReadCacheConfigurationProperty
set PropertyType "SizeGiB" ReadCacheConfigurationProperty
newValue ReadCacheConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ReadCacheConfigurationProperty -> ()
sizeGiB :: ReadCacheConfigurationProperty -> Maybe (Value Integer)
sizingMode :: ReadCacheConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
sizingMode :: Maybe (Value Text)
..}
    = ReadCacheConfigurationProperty
        {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" ReadCacheConfigurationProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
sizingMode :: Maybe (Value Text)
haddock_workaround_ :: ()
sizingMode :: Maybe (Value Text)
..}
instance Property "SizingMode" ReadCacheConfigurationProperty where
  type PropertyType "SizingMode" ReadCacheConfigurationProperty = Value Prelude.Text
  set :: PropertyType "SizingMode" ReadCacheConfigurationProperty
-> ReadCacheConfigurationProperty -> ReadCacheConfigurationProperty
set PropertyType "SizingMode" ReadCacheConfigurationProperty
newValue ReadCacheConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ReadCacheConfigurationProperty -> ()
sizeGiB :: ReadCacheConfigurationProperty -> Maybe (Value Integer)
sizingMode :: ReadCacheConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
sizingMode :: Maybe (Value Text)
..}
    = ReadCacheConfigurationProperty
        {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" ReadCacheConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
haddock_workaround_ :: ()
sizeGiB :: Maybe (Value Integer)
..}