module Stratosphere.Lightsail.Instance.AddOnProperty (
        module Exports, AddOnProperty(..), mkAddOnProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lightsail.Instance.AutoSnapshotAddOnProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AddOnProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-addon.html>
    AddOnProperty {AddOnProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-addon.html#cfn-lightsail-instance-addon-addontype>
                   AddOnProperty -> Value Text
addOnType :: (Value Prelude.Text),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-addon.html#cfn-lightsail-instance-addon-autosnapshotaddonrequest>
                   AddOnProperty -> Maybe AutoSnapshotAddOnProperty
autoSnapshotAddOnRequest :: (Prelude.Maybe AutoSnapshotAddOnProperty),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-addon.html#cfn-lightsail-instance-addon-status>
                   AddOnProperty -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AddOnProperty -> AddOnProperty -> Bool
(AddOnProperty -> AddOnProperty -> Bool)
-> (AddOnProperty -> AddOnProperty -> Bool) -> Eq AddOnProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AddOnProperty -> AddOnProperty -> Bool
== :: AddOnProperty -> AddOnProperty -> Bool
$c/= :: AddOnProperty -> AddOnProperty -> Bool
/= :: AddOnProperty -> AddOnProperty -> Bool
Prelude.Eq, Int -> AddOnProperty -> ShowS
[AddOnProperty] -> ShowS
AddOnProperty -> String
(Int -> AddOnProperty -> ShowS)
-> (AddOnProperty -> String)
-> ([AddOnProperty] -> ShowS)
-> Show AddOnProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AddOnProperty -> ShowS
showsPrec :: Int -> AddOnProperty -> ShowS
$cshow :: AddOnProperty -> String
show :: AddOnProperty -> String
$cshowList :: [AddOnProperty] -> ShowS
showList :: [AddOnProperty] -> ShowS
Prelude.Show)
mkAddOnProperty :: Value Prelude.Text -> AddOnProperty
mkAddOnProperty :: Value Text -> AddOnProperty
mkAddOnProperty Value Text
addOnType
  = AddOnProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), addOnType :: Value Text
addOnType = Value Text
addOnType,
       autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
autoSnapshotAddOnRequest = Maybe AutoSnapshotAddOnProperty
forall a. Maybe a
Prelude.Nothing,
       status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AddOnProperty where
  toResourceProperties :: AddOnProperty -> ResourceProperties
toResourceProperties AddOnProperty {Maybe (Value Text)
Maybe AutoSnapshotAddOnProperty
()
Value Text
haddock_workaround_ :: AddOnProperty -> ()
addOnType :: AddOnProperty -> Value Text
autoSnapshotAddOnRequest :: AddOnProperty -> Maybe AutoSnapshotAddOnProperty
status :: AddOnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
addOnType :: Value Text
autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
status :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lightsail::Instance.AddOn",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"AddOnType" 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..= Value Text
addOnType]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> AutoSnapshotAddOnProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AutoSnapshotAddOnRequest"
                                 (AutoSnapshotAddOnProperty -> (Key, Value))
-> Maybe AutoSnapshotAddOnProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoSnapshotAddOnProperty
autoSnapshotAddOnRequest,
                               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
"Status" (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)
status]))}
instance JSON.ToJSON AddOnProperty where
  toJSON :: AddOnProperty -> Value
toJSON AddOnProperty {Maybe (Value Text)
Maybe AutoSnapshotAddOnProperty
()
Value Text
haddock_workaround_ :: AddOnProperty -> ()
addOnType :: AddOnProperty -> Value Text
autoSnapshotAddOnRequest :: AddOnProperty -> Maybe AutoSnapshotAddOnProperty
status :: AddOnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
addOnType :: Value Text
autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
status :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"AddOnType" 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..= Value Text
addOnType]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> AutoSnapshotAddOnProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AutoSnapshotAddOnRequest"
                    (AutoSnapshotAddOnProperty -> (Key, Value))
-> Maybe AutoSnapshotAddOnProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoSnapshotAddOnProperty
autoSnapshotAddOnRequest,
                  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
"Status" (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)
status])))
instance Property "AddOnType" AddOnProperty where
  type PropertyType "AddOnType" AddOnProperty = Value Prelude.Text
  set :: PropertyType "AddOnType" AddOnProperty
-> AddOnProperty -> AddOnProperty
set PropertyType "AddOnType" AddOnProperty
newValue AddOnProperty {Maybe (Value Text)
Maybe AutoSnapshotAddOnProperty
()
Value Text
haddock_workaround_ :: AddOnProperty -> ()
addOnType :: AddOnProperty -> Value Text
autoSnapshotAddOnRequest :: AddOnProperty -> Maybe AutoSnapshotAddOnProperty
status :: AddOnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
addOnType :: Value Text
autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
status :: Maybe (Value Text)
..}
    = AddOnProperty {addOnType :: Value Text
addOnType = PropertyType "AddOnType" AddOnProperty
Value Text
newValue, Maybe (Value Text)
Maybe AutoSnapshotAddOnProperty
()
haddock_workaround_ :: ()
autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
status :: Maybe (Value Text)
haddock_workaround_ :: ()
autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
status :: Maybe (Value Text)
..}
instance Property "AutoSnapshotAddOnRequest" AddOnProperty where
  type PropertyType "AutoSnapshotAddOnRequest" AddOnProperty = AutoSnapshotAddOnProperty
  set :: PropertyType "AutoSnapshotAddOnRequest" AddOnProperty
-> AddOnProperty -> AddOnProperty
set PropertyType "AutoSnapshotAddOnRequest" AddOnProperty
newValue AddOnProperty {Maybe (Value Text)
Maybe AutoSnapshotAddOnProperty
()
Value Text
haddock_workaround_ :: AddOnProperty -> ()
addOnType :: AddOnProperty -> Value Text
autoSnapshotAddOnRequest :: AddOnProperty -> Maybe AutoSnapshotAddOnProperty
status :: AddOnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
addOnType :: Value Text
autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
status :: Maybe (Value Text)
..}
    = AddOnProperty
        {autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
autoSnapshotAddOnRequest = AutoSnapshotAddOnProperty -> Maybe AutoSnapshotAddOnProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AutoSnapshotAddOnRequest" AddOnProperty
AutoSnapshotAddOnProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
addOnType :: Value Text
status :: Maybe (Value Text)
haddock_workaround_ :: ()
addOnType :: Value Text
status :: Maybe (Value Text)
..}
instance Property "Status" AddOnProperty where
  type PropertyType "Status" AddOnProperty = Value Prelude.Text
  set :: PropertyType "Status" AddOnProperty
-> AddOnProperty -> AddOnProperty
set PropertyType "Status" AddOnProperty
newValue AddOnProperty {Maybe (Value Text)
Maybe AutoSnapshotAddOnProperty
()
Value Text
haddock_workaround_ :: AddOnProperty -> ()
addOnType :: AddOnProperty -> Value Text
autoSnapshotAddOnRequest :: AddOnProperty -> Maybe AutoSnapshotAddOnProperty
status :: AddOnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
addOnType :: Value Text
autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
status :: Maybe (Value Text)
..}
    = AddOnProperty {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" AddOnProperty
Value Text
newValue, Maybe AutoSnapshotAddOnProperty
()
Value Text
haddock_workaround_ :: ()
addOnType :: Value Text
autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
haddock_workaround_ :: ()
addOnType :: Value Text
autoSnapshotAddOnRequest :: Maybe AutoSnapshotAddOnProperty
..}