module Stratosphere.Backup.ReportPlan (
        module Exports, ReportPlan(..), mkReportPlan
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Backup.ReportPlan.ReportDeliveryChannelProperty as Exports
import {-# SOURCE #-} Stratosphere.Backup.ReportPlan.ReportSettingProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ReportPlan
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-reportplan.html>
    ReportPlan {ReportPlan -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-reportplan.html#cfn-backup-reportplan-reportdeliverychannel>
                ReportPlan -> ReportDeliveryChannelProperty
reportDeliveryChannel :: ReportDeliveryChannelProperty,
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-reportplan.html#cfn-backup-reportplan-reportplandescription>
                ReportPlan -> Maybe (Value Text)
reportPlanDescription :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-reportplan.html#cfn-backup-reportplan-reportplanname>
                ReportPlan -> Maybe (Value Text)
reportPlanName :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-reportplan.html#cfn-backup-reportplan-reportplantags>
                ReportPlan -> Maybe [Tag]
reportPlanTags :: (Prelude.Maybe [Tag]),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-reportplan.html#cfn-backup-reportplan-reportsetting>
                ReportPlan -> ReportSettingProperty
reportSetting :: ReportSettingProperty}
  deriving stock (ReportPlan -> ReportPlan -> Bool
(ReportPlan -> ReportPlan -> Bool)
-> (ReportPlan -> ReportPlan -> Bool) -> Eq ReportPlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReportPlan -> ReportPlan -> Bool
== :: ReportPlan -> ReportPlan -> Bool
$c/= :: ReportPlan -> ReportPlan -> Bool
/= :: ReportPlan -> ReportPlan -> Bool
Prelude.Eq, Int -> ReportPlan -> ShowS
[ReportPlan] -> ShowS
ReportPlan -> String
(Int -> ReportPlan -> ShowS)
-> (ReportPlan -> String)
-> ([ReportPlan] -> ShowS)
-> Show ReportPlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReportPlan -> ShowS
showsPrec :: Int -> ReportPlan -> ShowS
$cshow :: ReportPlan -> String
show :: ReportPlan -> String
$cshowList :: [ReportPlan] -> ShowS
showList :: [ReportPlan] -> ShowS
Prelude.Show)
mkReportPlan ::
  ReportDeliveryChannelProperty
  -> ReportSettingProperty -> ReportPlan
mkReportPlan :: ReportDeliveryChannelProperty
-> ReportSettingProperty -> ReportPlan
mkReportPlan ReportDeliveryChannelProperty
reportDeliveryChannel ReportSettingProperty
reportSetting
  = ReportPlan
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       reportDeliveryChannel :: ReportDeliveryChannelProperty
reportDeliveryChannel = ReportDeliveryChannelProperty
reportDeliveryChannel,
       reportSetting :: ReportSettingProperty
reportSetting = ReportSettingProperty
reportSetting,
       reportPlanDescription :: Maybe (Value Text)
reportPlanDescription = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       reportPlanName :: Maybe (Value Text)
reportPlanName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, reportPlanTags :: Maybe [Tag]
reportPlanTags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ReportPlan where
  toResourceProperties :: ReportPlan -> ResourceProperties
toResourceProperties ReportPlan {Maybe [Tag]
Maybe (Value Text)
()
ReportDeliveryChannelProperty
ReportSettingProperty
haddock_workaround_ :: ReportPlan -> ()
reportDeliveryChannel :: ReportPlan -> ReportDeliveryChannelProperty
reportPlanDescription :: ReportPlan -> Maybe (Value Text)
reportPlanName :: ReportPlan -> Maybe (Value Text)
reportPlanTags :: ReportPlan -> Maybe [Tag]
reportSetting :: ReportPlan -> ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Backup::ReportPlan", 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
"ReportDeliveryChannel" Key -> ReportDeliveryChannelProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ReportDeliveryChannelProperty
reportDeliveryChannel,
                            Key
"ReportSetting" Key -> ReportSettingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ReportSettingProperty
reportSetting]
                           ([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
"ReportPlanDescription"
                                 (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)
reportPlanDescription,
                               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
"ReportPlanName" (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)
reportPlanName,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReportPlanTags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
reportPlanTags]))}
instance JSON.ToJSON ReportPlan where
  toJSON :: ReportPlan -> Value
toJSON ReportPlan {Maybe [Tag]
Maybe (Value Text)
()
ReportDeliveryChannelProperty
ReportSettingProperty
haddock_workaround_ :: ReportPlan -> ()
reportDeliveryChannel :: ReportPlan -> ReportDeliveryChannelProperty
reportPlanDescription :: ReportPlan -> Maybe (Value Text)
reportPlanName :: ReportPlan -> Maybe (Value Text)
reportPlanTags :: ReportPlan -> Maybe [Tag]
reportSetting :: ReportPlan -> ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
..}
    = [(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
"ReportDeliveryChannel" Key -> ReportDeliveryChannelProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ReportDeliveryChannelProperty
reportDeliveryChannel,
               Key
"ReportSetting" Key -> ReportSettingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ReportSettingProperty
reportSetting]
              ([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
"ReportPlanDescription"
                    (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)
reportPlanDescription,
                  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
"ReportPlanName" (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)
reportPlanName,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReportPlanTags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
reportPlanTags])))
instance Property "ReportDeliveryChannel" ReportPlan where
  type PropertyType "ReportDeliveryChannel" ReportPlan = ReportDeliveryChannelProperty
  set :: PropertyType "ReportDeliveryChannel" ReportPlan
-> ReportPlan -> ReportPlan
set PropertyType "ReportDeliveryChannel" ReportPlan
newValue ReportPlan {Maybe [Tag]
Maybe (Value Text)
()
ReportDeliveryChannelProperty
ReportSettingProperty
haddock_workaround_ :: ReportPlan -> ()
reportDeliveryChannel :: ReportPlan -> ReportDeliveryChannelProperty
reportPlanDescription :: ReportPlan -> Maybe (Value Text)
reportPlanName :: ReportPlan -> Maybe (Value Text)
reportPlanTags :: ReportPlan -> Maybe [Tag]
reportSetting :: ReportPlan -> ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
..}
    = ReportPlan {reportDeliveryChannel :: ReportDeliveryChannelProperty
reportDeliveryChannel = PropertyType "ReportDeliveryChannel" ReportPlan
ReportDeliveryChannelProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
ReportSettingProperty
haddock_workaround_ :: ()
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
haddock_workaround_ :: ()
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
..}
instance Property "ReportPlanDescription" ReportPlan where
  type PropertyType "ReportPlanDescription" ReportPlan = Value Prelude.Text
  set :: PropertyType "ReportPlanDescription" ReportPlan
-> ReportPlan -> ReportPlan
set PropertyType "ReportPlanDescription" ReportPlan
newValue ReportPlan {Maybe [Tag]
Maybe (Value Text)
()
ReportDeliveryChannelProperty
ReportSettingProperty
haddock_workaround_ :: ReportPlan -> ()
reportDeliveryChannel :: ReportPlan -> ReportDeliveryChannelProperty
reportPlanDescription :: ReportPlan -> Maybe (Value Text)
reportPlanName :: ReportPlan -> Maybe (Value Text)
reportPlanTags :: ReportPlan -> Maybe [Tag]
reportSetting :: ReportPlan -> ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
..}
    = ReportPlan {reportPlanDescription :: Maybe (Value Text)
reportPlanDescription = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReportPlanDescription" ReportPlan
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
ReportDeliveryChannelProperty
ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
..}
instance Property "ReportPlanName" ReportPlan where
  type PropertyType "ReportPlanName" ReportPlan = Value Prelude.Text
  set :: PropertyType "ReportPlanName" ReportPlan
-> ReportPlan -> ReportPlan
set PropertyType "ReportPlanName" ReportPlan
newValue ReportPlan {Maybe [Tag]
Maybe (Value Text)
()
ReportDeliveryChannelProperty
ReportSettingProperty
haddock_workaround_ :: ReportPlan -> ()
reportDeliveryChannel :: ReportPlan -> ReportDeliveryChannelProperty
reportPlanDescription :: ReportPlan -> Maybe (Value Text)
reportPlanName :: ReportPlan -> Maybe (Value Text)
reportPlanTags :: ReportPlan -> Maybe [Tag]
reportSetting :: ReportPlan -> ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
..}
    = ReportPlan {reportPlanName :: Maybe (Value Text)
reportPlanName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReportPlanName" ReportPlan
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
ReportDeliveryChannelProperty
ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
..}
instance Property "ReportPlanTags" ReportPlan where
  type PropertyType "ReportPlanTags" ReportPlan = [Tag]
  set :: PropertyType "ReportPlanTags" ReportPlan
-> ReportPlan -> ReportPlan
set PropertyType "ReportPlanTags" ReportPlan
newValue ReportPlan {Maybe [Tag]
Maybe (Value Text)
()
ReportDeliveryChannelProperty
ReportSettingProperty
haddock_workaround_ :: ReportPlan -> ()
reportDeliveryChannel :: ReportPlan -> ReportDeliveryChannelProperty
reportPlanDescription :: ReportPlan -> Maybe (Value Text)
reportPlanName :: ReportPlan -> Maybe (Value Text)
reportPlanTags :: ReportPlan -> Maybe [Tag]
reportSetting :: ReportPlan -> ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
..}
    = ReportPlan {reportPlanTags :: Maybe [Tag]
reportPlanTags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "ReportPlanTags" ReportPlan
newValue, Maybe (Value Text)
()
ReportDeliveryChannelProperty
ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportSetting :: ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportSetting :: ReportSettingProperty
..}
instance Property "ReportSetting" ReportPlan where
  type PropertyType "ReportSetting" ReportPlan = ReportSettingProperty
  set :: PropertyType "ReportSetting" ReportPlan -> ReportPlan -> ReportPlan
set PropertyType "ReportSetting" ReportPlan
newValue ReportPlan {Maybe [Tag]
Maybe (Value Text)
()
ReportDeliveryChannelProperty
ReportSettingProperty
haddock_workaround_ :: ReportPlan -> ()
reportDeliveryChannel :: ReportPlan -> ReportDeliveryChannelProperty
reportPlanDescription :: ReportPlan -> Maybe (Value Text)
reportPlanName :: ReportPlan -> Maybe (Value Text)
reportPlanTags :: ReportPlan -> Maybe [Tag]
reportSetting :: ReportPlan -> ReportSettingProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
reportSetting :: ReportSettingProperty
..}
    = ReportPlan {reportSetting :: ReportSettingProperty
reportSetting = PropertyType "ReportSetting" ReportPlan
ReportSettingProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
ReportDeliveryChannelProperty
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
haddock_workaround_ :: ()
reportDeliveryChannel :: ReportDeliveryChannelProperty
reportPlanDescription :: Maybe (Value Text)
reportPlanName :: Maybe (Value Text)
reportPlanTags :: Maybe [Tag]
..}