{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.FSx.Types.CreateFileCacheLustreConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FSx.Types.FileCacheLustreDeploymentType
import Amazonka.FSx.Types.FileCacheLustreMetadataConfiguration
import qualified Amazonka.Prelude as Prelude
data CreateFileCacheLustreConfiguration = CreateFileCacheLustreConfiguration'
{ CreateFileCacheLustreConfiguration -> Maybe Text
weeklyMaintenanceStartTime :: Prelude.Maybe Prelude.Text,
CreateFileCacheLustreConfiguration -> Natural
perUnitStorageThroughput :: Prelude.Natural,
CreateFileCacheLustreConfiguration -> FileCacheLustreDeploymentType
deploymentType :: FileCacheLustreDeploymentType,
CreateFileCacheLustreConfiguration
-> FileCacheLustreMetadataConfiguration
metadataConfiguration :: FileCacheLustreMetadataConfiguration
}
deriving (CreateFileCacheLustreConfiguration
-> CreateFileCacheLustreConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFileCacheLustreConfiguration
-> CreateFileCacheLustreConfiguration -> Bool
$c/= :: CreateFileCacheLustreConfiguration
-> CreateFileCacheLustreConfiguration -> Bool
== :: CreateFileCacheLustreConfiguration
-> CreateFileCacheLustreConfiguration -> Bool
$c== :: CreateFileCacheLustreConfiguration
-> CreateFileCacheLustreConfiguration -> Bool
Prelude.Eq, ReadPrec [CreateFileCacheLustreConfiguration]
ReadPrec CreateFileCacheLustreConfiguration
Int -> ReadS CreateFileCacheLustreConfiguration
ReadS [CreateFileCacheLustreConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFileCacheLustreConfiguration]
$creadListPrec :: ReadPrec [CreateFileCacheLustreConfiguration]
readPrec :: ReadPrec CreateFileCacheLustreConfiguration
$creadPrec :: ReadPrec CreateFileCacheLustreConfiguration
readList :: ReadS [CreateFileCacheLustreConfiguration]
$creadList :: ReadS [CreateFileCacheLustreConfiguration]
readsPrec :: Int -> ReadS CreateFileCacheLustreConfiguration
$creadsPrec :: Int -> ReadS CreateFileCacheLustreConfiguration
Prelude.Read, Int -> CreateFileCacheLustreConfiguration -> ShowS
[CreateFileCacheLustreConfiguration] -> ShowS
CreateFileCacheLustreConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFileCacheLustreConfiguration] -> ShowS
$cshowList :: [CreateFileCacheLustreConfiguration] -> ShowS
show :: CreateFileCacheLustreConfiguration -> String
$cshow :: CreateFileCacheLustreConfiguration -> String
showsPrec :: Int -> CreateFileCacheLustreConfiguration -> ShowS
$cshowsPrec :: Int -> CreateFileCacheLustreConfiguration -> ShowS
Prelude.Show, forall x.
Rep CreateFileCacheLustreConfiguration x
-> CreateFileCacheLustreConfiguration
forall x.
CreateFileCacheLustreConfiguration
-> Rep CreateFileCacheLustreConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateFileCacheLustreConfiguration x
-> CreateFileCacheLustreConfiguration
$cfrom :: forall x.
CreateFileCacheLustreConfiguration
-> Rep CreateFileCacheLustreConfiguration x
Prelude.Generic)
newCreateFileCacheLustreConfiguration ::
Prelude.Natural ->
FileCacheLustreDeploymentType ->
FileCacheLustreMetadataConfiguration ->
CreateFileCacheLustreConfiguration
newCreateFileCacheLustreConfiguration :: Natural
-> FileCacheLustreDeploymentType
-> FileCacheLustreMetadataConfiguration
-> CreateFileCacheLustreConfiguration
newCreateFileCacheLustreConfiguration
Natural
pPerUnitStorageThroughput_
FileCacheLustreDeploymentType
pDeploymentType_
FileCacheLustreMetadataConfiguration
pMetadataConfiguration_ =
CreateFileCacheLustreConfiguration'
{ $sel:weeklyMaintenanceStartTime:CreateFileCacheLustreConfiguration' :: Maybe Text
weeklyMaintenanceStartTime =
forall a. Maybe a
Prelude.Nothing,
$sel:perUnitStorageThroughput:CreateFileCacheLustreConfiguration' :: Natural
perUnitStorageThroughput =
Natural
pPerUnitStorageThroughput_,
$sel:deploymentType:CreateFileCacheLustreConfiguration' :: FileCacheLustreDeploymentType
deploymentType = FileCacheLustreDeploymentType
pDeploymentType_,
$sel:metadataConfiguration:CreateFileCacheLustreConfiguration' :: FileCacheLustreMetadataConfiguration
metadataConfiguration =
FileCacheLustreMetadataConfiguration
pMetadataConfiguration_
}
createFileCacheLustreConfiguration_weeklyMaintenanceStartTime :: Lens.Lens' CreateFileCacheLustreConfiguration (Prelude.Maybe Prelude.Text)
createFileCacheLustreConfiguration_weeklyMaintenanceStartTime :: Lens' CreateFileCacheLustreConfiguration (Maybe Text)
createFileCacheLustreConfiguration_weeklyMaintenanceStartTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFileCacheLustreConfiguration' {Maybe Text
weeklyMaintenanceStartTime :: Maybe Text
$sel:weeklyMaintenanceStartTime:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> Maybe Text
weeklyMaintenanceStartTime} -> Maybe Text
weeklyMaintenanceStartTime) (\s :: CreateFileCacheLustreConfiguration
s@CreateFileCacheLustreConfiguration' {} Maybe Text
a -> CreateFileCacheLustreConfiguration
s {$sel:weeklyMaintenanceStartTime:CreateFileCacheLustreConfiguration' :: Maybe Text
weeklyMaintenanceStartTime = Maybe Text
a} :: CreateFileCacheLustreConfiguration)
createFileCacheLustreConfiguration_perUnitStorageThroughput :: Lens.Lens' CreateFileCacheLustreConfiguration Prelude.Natural
createFileCacheLustreConfiguration_perUnitStorageThroughput :: Lens' CreateFileCacheLustreConfiguration Natural
createFileCacheLustreConfiguration_perUnitStorageThroughput = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFileCacheLustreConfiguration' {Natural
perUnitStorageThroughput :: Natural
$sel:perUnitStorageThroughput:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> Natural
perUnitStorageThroughput} -> Natural
perUnitStorageThroughput) (\s :: CreateFileCacheLustreConfiguration
s@CreateFileCacheLustreConfiguration' {} Natural
a -> CreateFileCacheLustreConfiguration
s {$sel:perUnitStorageThroughput:CreateFileCacheLustreConfiguration' :: Natural
perUnitStorageThroughput = Natural
a} :: CreateFileCacheLustreConfiguration)
createFileCacheLustreConfiguration_deploymentType :: Lens.Lens' CreateFileCacheLustreConfiguration FileCacheLustreDeploymentType
createFileCacheLustreConfiguration_deploymentType :: Lens'
CreateFileCacheLustreConfiguration FileCacheLustreDeploymentType
createFileCacheLustreConfiguration_deploymentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFileCacheLustreConfiguration' {FileCacheLustreDeploymentType
deploymentType :: FileCacheLustreDeploymentType
$sel:deploymentType:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> FileCacheLustreDeploymentType
deploymentType} -> FileCacheLustreDeploymentType
deploymentType) (\s :: CreateFileCacheLustreConfiguration
s@CreateFileCacheLustreConfiguration' {} FileCacheLustreDeploymentType
a -> CreateFileCacheLustreConfiguration
s {$sel:deploymentType:CreateFileCacheLustreConfiguration' :: FileCacheLustreDeploymentType
deploymentType = FileCacheLustreDeploymentType
a} :: CreateFileCacheLustreConfiguration)
createFileCacheLustreConfiguration_metadataConfiguration :: Lens.Lens' CreateFileCacheLustreConfiguration FileCacheLustreMetadataConfiguration
createFileCacheLustreConfiguration_metadataConfiguration :: Lens'
CreateFileCacheLustreConfiguration
FileCacheLustreMetadataConfiguration
createFileCacheLustreConfiguration_metadataConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFileCacheLustreConfiguration' {FileCacheLustreMetadataConfiguration
metadataConfiguration :: FileCacheLustreMetadataConfiguration
$sel:metadataConfiguration:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration
-> FileCacheLustreMetadataConfiguration
metadataConfiguration} -> FileCacheLustreMetadataConfiguration
metadataConfiguration) (\s :: CreateFileCacheLustreConfiguration
s@CreateFileCacheLustreConfiguration' {} FileCacheLustreMetadataConfiguration
a -> CreateFileCacheLustreConfiguration
s {$sel:metadataConfiguration:CreateFileCacheLustreConfiguration' :: FileCacheLustreMetadataConfiguration
metadataConfiguration = FileCacheLustreMetadataConfiguration
a} :: CreateFileCacheLustreConfiguration)
instance
Prelude.Hashable
CreateFileCacheLustreConfiguration
where
hashWithSalt :: Int -> CreateFileCacheLustreConfiguration -> Int
hashWithSalt
Int
_salt
CreateFileCacheLustreConfiguration' {Natural
Maybe Text
FileCacheLustreDeploymentType
FileCacheLustreMetadataConfiguration
metadataConfiguration :: FileCacheLustreMetadataConfiguration
deploymentType :: FileCacheLustreDeploymentType
perUnitStorageThroughput :: Natural
weeklyMaintenanceStartTime :: Maybe Text
$sel:metadataConfiguration:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration
-> FileCacheLustreMetadataConfiguration
$sel:deploymentType:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> FileCacheLustreDeploymentType
$sel:perUnitStorageThroughput:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> Natural
$sel:weeklyMaintenanceStartTime:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
weeklyMaintenanceStartTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
perUnitStorageThroughput
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` FileCacheLustreDeploymentType
deploymentType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` FileCacheLustreMetadataConfiguration
metadataConfiguration
instance
Prelude.NFData
CreateFileCacheLustreConfiguration
where
rnf :: CreateFileCacheLustreConfiguration -> ()
rnf CreateFileCacheLustreConfiguration' {Natural
Maybe Text
FileCacheLustreDeploymentType
FileCacheLustreMetadataConfiguration
metadataConfiguration :: FileCacheLustreMetadataConfiguration
deploymentType :: FileCacheLustreDeploymentType
perUnitStorageThroughput :: Natural
weeklyMaintenanceStartTime :: Maybe Text
$sel:metadataConfiguration:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration
-> FileCacheLustreMetadataConfiguration
$sel:deploymentType:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> FileCacheLustreDeploymentType
$sel:perUnitStorageThroughput:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> Natural
$sel:weeklyMaintenanceStartTime:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
weeklyMaintenanceStartTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
perUnitStorageThroughput
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf FileCacheLustreDeploymentType
deploymentType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf FileCacheLustreMetadataConfiguration
metadataConfiguration
instance
Data.ToJSON
CreateFileCacheLustreConfiguration
where
toJSON :: CreateFileCacheLustreConfiguration -> Value
toJSON CreateFileCacheLustreConfiguration' {Natural
Maybe Text
FileCacheLustreDeploymentType
FileCacheLustreMetadataConfiguration
metadataConfiguration :: FileCacheLustreMetadataConfiguration
deploymentType :: FileCacheLustreDeploymentType
perUnitStorageThroughput :: Natural
weeklyMaintenanceStartTime :: Maybe Text
$sel:metadataConfiguration:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration
-> FileCacheLustreMetadataConfiguration
$sel:deploymentType:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> FileCacheLustreDeploymentType
$sel:perUnitStorageThroughput:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> Natural
$sel:weeklyMaintenanceStartTime:CreateFileCacheLustreConfiguration' :: CreateFileCacheLustreConfiguration -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"WeeklyMaintenanceStartTime" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
weeklyMaintenanceStartTime,
forall a. a -> Maybe a
Prelude.Just
( Key
"PerUnitStorageThroughput"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
perUnitStorageThroughput
),
forall a. a -> Maybe a
Prelude.Just
(Key
"DeploymentType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= FileCacheLustreDeploymentType
deploymentType),
forall a. a -> Maybe a
Prelude.Just
( Key
"MetadataConfiguration"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= FileCacheLustreMetadataConfiguration
metadataConfiguration
)
]
)