module Stratosphere.Lightsail.Disk.AutoSnapshotAddOnProperty (
        AutoSnapshotAddOnProperty(..), mkAutoSnapshotAddOnProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AutoSnapshotAddOnProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-disk-autosnapshotaddon.html>
    AutoSnapshotAddOnProperty {AutoSnapshotAddOnProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-disk-autosnapshotaddon.html#cfn-lightsail-disk-autosnapshotaddon-snapshottimeofday>
                               AutoSnapshotAddOnProperty -> Maybe (Value Text)
snapshotTimeOfDay :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AutoSnapshotAddOnProperty -> AutoSnapshotAddOnProperty -> Bool
(AutoSnapshotAddOnProperty -> AutoSnapshotAddOnProperty -> Bool)
-> (AutoSnapshotAddOnProperty -> AutoSnapshotAddOnProperty -> Bool)
-> Eq AutoSnapshotAddOnProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AutoSnapshotAddOnProperty -> AutoSnapshotAddOnProperty -> Bool
== :: AutoSnapshotAddOnProperty -> AutoSnapshotAddOnProperty -> Bool
$c/= :: AutoSnapshotAddOnProperty -> AutoSnapshotAddOnProperty -> Bool
/= :: AutoSnapshotAddOnProperty -> AutoSnapshotAddOnProperty -> Bool
Prelude.Eq, Int -> AutoSnapshotAddOnProperty -> ShowS
[AutoSnapshotAddOnProperty] -> ShowS
AutoSnapshotAddOnProperty -> String
(Int -> AutoSnapshotAddOnProperty -> ShowS)
-> (AutoSnapshotAddOnProperty -> String)
-> ([AutoSnapshotAddOnProperty] -> ShowS)
-> Show AutoSnapshotAddOnProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AutoSnapshotAddOnProperty -> ShowS
showsPrec :: Int -> AutoSnapshotAddOnProperty -> ShowS
$cshow :: AutoSnapshotAddOnProperty -> String
show :: AutoSnapshotAddOnProperty -> String
$cshowList :: [AutoSnapshotAddOnProperty] -> ShowS
showList :: [AutoSnapshotAddOnProperty] -> ShowS
Prelude.Show)
mkAutoSnapshotAddOnProperty :: AutoSnapshotAddOnProperty
mkAutoSnapshotAddOnProperty :: AutoSnapshotAddOnProperty
mkAutoSnapshotAddOnProperty
  = AutoSnapshotAddOnProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), snapshotTimeOfDay :: Maybe (Value Text)
snapshotTimeOfDay = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AutoSnapshotAddOnProperty where
  toResourceProperties :: AutoSnapshotAddOnProperty -> ResourceProperties
toResourceProperties AutoSnapshotAddOnProperty {Maybe (Value Text)
()
haddock_workaround_ :: AutoSnapshotAddOnProperty -> ()
snapshotTimeOfDay :: AutoSnapshotAddOnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
snapshotTimeOfDay :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lightsail::Disk.AutoSnapshotAddOn",
         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 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
"SnapshotTimeOfDay" (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)
snapshotTimeOfDay])}
instance JSON.ToJSON AutoSnapshotAddOnProperty where
  toJSON :: AutoSnapshotAddOnProperty -> Value
toJSON AutoSnapshotAddOnProperty {Maybe (Value Text)
()
haddock_workaround_ :: AutoSnapshotAddOnProperty -> ()
snapshotTimeOfDay :: AutoSnapshotAddOnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
snapshotTimeOfDay :: 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 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
"SnapshotTimeOfDay" (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)
snapshotTimeOfDay]))
instance Property "SnapshotTimeOfDay" AutoSnapshotAddOnProperty where
  type PropertyType "SnapshotTimeOfDay" AutoSnapshotAddOnProperty = Value Prelude.Text
  set :: PropertyType "SnapshotTimeOfDay" AutoSnapshotAddOnProperty
-> AutoSnapshotAddOnProperty -> AutoSnapshotAddOnProperty
set PropertyType "SnapshotTimeOfDay" AutoSnapshotAddOnProperty
newValue AutoSnapshotAddOnProperty {Maybe (Value Text)
()
haddock_workaround_ :: AutoSnapshotAddOnProperty -> ()
snapshotTimeOfDay :: AutoSnapshotAddOnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
snapshotTimeOfDay :: Maybe (Value Text)
..}
    = AutoSnapshotAddOnProperty
        {snapshotTimeOfDay :: Maybe (Value Text)
snapshotTimeOfDay = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SnapshotTimeOfDay" AutoSnapshotAddOnProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}