module Stratosphere.FSx.Volume.TieringPolicyProperty (
        TieringPolicyProperty(..), mkTieringPolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TieringPolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-volume-ontapconfiguration-tieringpolicy.html>
    TieringPolicyProperty {TieringPolicyProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-volume-ontapconfiguration-tieringpolicy.html#cfn-fsx-volume-ontapconfiguration-tieringpolicy-coolingperiod>
                           TieringPolicyProperty -> Maybe (Value Integer)
coolingPeriod :: (Prelude.Maybe (Value Prelude.Integer)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-volume-ontapconfiguration-tieringpolicy.html#cfn-fsx-volume-ontapconfiguration-tieringpolicy-name>
                           TieringPolicyProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (TieringPolicyProperty -> TieringPolicyProperty -> Bool
(TieringPolicyProperty -> TieringPolicyProperty -> Bool)
-> (TieringPolicyProperty -> TieringPolicyProperty -> Bool)
-> Eq TieringPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TieringPolicyProperty -> TieringPolicyProperty -> Bool
== :: TieringPolicyProperty -> TieringPolicyProperty -> Bool
$c/= :: TieringPolicyProperty -> TieringPolicyProperty -> Bool
/= :: TieringPolicyProperty -> TieringPolicyProperty -> Bool
Prelude.Eq, Int -> TieringPolicyProperty -> ShowS
[TieringPolicyProperty] -> ShowS
TieringPolicyProperty -> String
(Int -> TieringPolicyProperty -> ShowS)
-> (TieringPolicyProperty -> String)
-> ([TieringPolicyProperty] -> ShowS)
-> Show TieringPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TieringPolicyProperty -> ShowS
showsPrec :: Int -> TieringPolicyProperty -> ShowS
$cshow :: TieringPolicyProperty -> String
show :: TieringPolicyProperty -> String
$cshowList :: [TieringPolicyProperty] -> ShowS
showList :: [TieringPolicyProperty] -> ShowS
Prelude.Show)
mkTieringPolicyProperty :: TieringPolicyProperty
mkTieringPolicyProperty :: TieringPolicyProperty
mkTieringPolicyProperty
  = TieringPolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), coolingPeriod :: Maybe (Value Integer)
coolingPeriod = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TieringPolicyProperty where
  toResourceProperties :: TieringPolicyProperty -> ResourceProperties
toResourceProperties TieringPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: TieringPolicyProperty -> ()
coolingPeriod :: TieringPolicyProperty -> Maybe (Value Integer)
name :: TieringPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
coolingPeriod :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::FSx::Volume.TieringPolicy",
         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
"CoolingPeriod" (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)
coolingPeriod,
                            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
"Name" (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)
name])}
instance JSON.ToJSON TieringPolicyProperty where
  toJSON :: TieringPolicyProperty -> Value
toJSON TieringPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: TieringPolicyProperty -> ()
coolingPeriod :: TieringPolicyProperty -> Maybe (Value Integer)
name :: TieringPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
coolingPeriod :: Maybe (Value Integer)
name :: 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
"CoolingPeriod" (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)
coolingPeriod,
               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
"Name" (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)
name]))
instance Property "CoolingPeriod" TieringPolicyProperty where
  type PropertyType "CoolingPeriod" TieringPolicyProperty = Value Prelude.Integer
  set :: PropertyType "CoolingPeriod" TieringPolicyProperty
-> TieringPolicyProperty -> TieringPolicyProperty
set PropertyType "CoolingPeriod" TieringPolicyProperty
newValue TieringPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: TieringPolicyProperty -> ()
coolingPeriod :: TieringPolicyProperty -> Maybe (Value Integer)
name :: TieringPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
coolingPeriod :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
    = TieringPolicyProperty {coolingPeriod :: Maybe (Value Integer)
coolingPeriod = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CoolingPeriod" TieringPolicyProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
instance Property "Name" TieringPolicyProperty where
  type PropertyType "Name" TieringPolicyProperty = Value Prelude.Text
  set :: PropertyType "Name" TieringPolicyProperty
-> TieringPolicyProperty -> TieringPolicyProperty
set PropertyType "Name" TieringPolicyProperty
newValue TieringPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: TieringPolicyProperty -> ()
coolingPeriod :: TieringPolicyProperty -> Maybe (Value Integer)
name :: TieringPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
coolingPeriod :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
    = TieringPolicyProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" TieringPolicyProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
coolingPeriod :: Maybe (Value Integer)
haddock_workaround_ :: ()
coolingPeriod :: Maybe (Value Integer)
..}