module Stratosphere.EC2.CapacityManagerDataExport (
        CapacityManagerDataExport(..), mkCapacityManagerDataExport
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data CapacityManagerDataExport
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacitymanagerdataexport.html>
    CapacityManagerDataExport {CapacityManagerDataExport -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacitymanagerdataexport.html#cfn-ec2-capacitymanagerdataexport-outputformat>
                               CapacityManagerDataExport -> Value Text
outputFormat :: (Value Prelude.Text),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacitymanagerdataexport.html#cfn-ec2-capacitymanagerdataexport-s3bucketname>
                               CapacityManagerDataExport -> Value Text
s3BucketName :: (Value Prelude.Text),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacitymanagerdataexport.html#cfn-ec2-capacitymanagerdataexport-s3bucketprefix>
                               CapacityManagerDataExport -> Maybe (Value Text)
s3BucketPrefix :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacitymanagerdataexport.html#cfn-ec2-capacitymanagerdataexport-schedule>
                               CapacityManagerDataExport -> Value Text
schedule :: (Value Prelude.Text),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacitymanagerdataexport.html#cfn-ec2-capacitymanagerdataexport-tags>
                               CapacityManagerDataExport -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (CapacityManagerDataExport -> CapacityManagerDataExport -> Bool
(CapacityManagerDataExport -> CapacityManagerDataExport -> Bool)
-> (CapacityManagerDataExport -> CapacityManagerDataExport -> Bool)
-> Eq CapacityManagerDataExport
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CapacityManagerDataExport -> CapacityManagerDataExport -> Bool
== :: CapacityManagerDataExport -> CapacityManagerDataExport -> Bool
$c/= :: CapacityManagerDataExport -> CapacityManagerDataExport -> Bool
/= :: CapacityManagerDataExport -> CapacityManagerDataExport -> Bool
Prelude.Eq, Int -> CapacityManagerDataExport -> ShowS
[CapacityManagerDataExport] -> ShowS
CapacityManagerDataExport -> String
(Int -> CapacityManagerDataExport -> ShowS)
-> (CapacityManagerDataExport -> String)
-> ([CapacityManagerDataExport] -> ShowS)
-> Show CapacityManagerDataExport
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CapacityManagerDataExport -> ShowS
showsPrec :: Int -> CapacityManagerDataExport -> ShowS
$cshow :: CapacityManagerDataExport -> String
show :: CapacityManagerDataExport -> String
$cshowList :: [CapacityManagerDataExport] -> ShowS
showList :: [CapacityManagerDataExport] -> ShowS
Prelude.Show)
mkCapacityManagerDataExport ::
  Value Prelude.Text
  -> Value Prelude.Text
     -> Value Prelude.Text -> CapacityManagerDataExport
mkCapacityManagerDataExport :: Value Text -> Value Text -> Value Text -> CapacityManagerDataExport
mkCapacityManagerDataExport Value Text
outputFormat Value Text
s3BucketName Value Text
schedule
  = CapacityManagerDataExport
      {haddock_workaround_ :: ()
haddock_workaround_ = (), outputFormat :: Value Text
outputFormat = Value Text
outputFormat,
       s3BucketName :: Value Text
s3BucketName = Value Text
s3BucketName, schedule :: Value Text
schedule = Value Text
schedule,
       s3BucketPrefix :: Maybe (Value Text)
s3BucketPrefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CapacityManagerDataExport where
  toResourceProperties :: CapacityManagerDataExport -> ResourceProperties
toResourceProperties CapacityManagerDataExport {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CapacityManagerDataExport -> ()
outputFormat :: CapacityManagerDataExport -> Value Text
s3BucketName :: CapacityManagerDataExport -> Value Text
s3BucketPrefix :: CapacityManagerDataExport -> Maybe (Value Text)
schedule :: CapacityManagerDataExport -> Value Text
tags :: CapacityManagerDataExport -> Maybe [Tag]
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::CapacityManagerDataExport",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"OutputFormat" 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
outputFormat,
                            Key
"S3BucketName" 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
s3BucketName, Key
"Schedule" 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
schedule]
                           ([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
"S3BucketPrefix" (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)
s3BucketPrefix,
                               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
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON CapacityManagerDataExport where
  toJSON :: CapacityManagerDataExport -> Value
toJSON CapacityManagerDataExport {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CapacityManagerDataExport -> ()
outputFormat :: CapacityManagerDataExport -> Value Text
s3BucketName :: CapacityManagerDataExport -> Value Text
s3BucketPrefix :: CapacityManagerDataExport -> Maybe (Value Text)
schedule :: CapacityManagerDataExport -> Value Text
tags :: CapacityManagerDataExport -> Maybe [Tag]
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
..}
    = [(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
"OutputFormat" 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
outputFormat,
               Key
"S3BucketName" 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
s3BucketName, Key
"Schedule" 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
schedule]
              ([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
"S3BucketPrefix" (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)
s3BucketPrefix,
                  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
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "OutputFormat" CapacityManagerDataExport where
  type PropertyType "OutputFormat" CapacityManagerDataExport = Value Prelude.Text
  set :: PropertyType "OutputFormat" CapacityManagerDataExport
-> CapacityManagerDataExport -> CapacityManagerDataExport
set PropertyType "OutputFormat" CapacityManagerDataExport
newValue CapacityManagerDataExport {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CapacityManagerDataExport -> ()
outputFormat :: CapacityManagerDataExport -> Value Text
s3BucketName :: CapacityManagerDataExport -> Value Text
s3BucketPrefix :: CapacityManagerDataExport -> Maybe (Value Text)
schedule :: CapacityManagerDataExport -> Value Text
tags :: CapacityManagerDataExport -> Maybe [Tag]
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
..}
    = CapacityManagerDataExport {outputFormat :: Value Text
outputFormat = PropertyType "OutputFormat" CapacityManagerDataExport
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
..}
instance Property "S3BucketName" CapacityManagerDataExport where
  type PropertyType "S3BucketName" CapacityManagerDataExport = Value Prelude.Text
  set :: PropertyType "S3BucketName" CapacityManagerDataExport
-> CapacityManagerDataExport -> CapacityManagerDataExport
set PropertyType "S3BucketName" CapacityManagerDataExport
newValue CapacityManagerDataExport {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CapacityManagerDataExport -> ()
outputFormat :: CapacityManagerDataExport -> Value Text
s3BucketName :: CapacityManagerDataExport -> Value Text
s3BucketPrefix :: CapacityManagerDataExport -> Maybe (Value Text)
schedule :: CapacityManagerDataExport -> Value Text
tags :: CapacityManagerDataExport -> Maybe [Tag]
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
..}
    = CapacityManagerDataExport {s3BucketName :: Value Text
s3BucketName = PropertyType "S3BucketName" CapacityManagerDataExport
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
..}
instance Property "S3BucketPrefix" CapacityManagerDataExport where
  type PropertyType "S3BucketPrefix" CapacityManagerDataExport = Value Prelude.Text
  set :: PropertyType "S3BucketPrefix" CapacityManagerDataExport
-> CapacityManagerDataExport -> CapacityManagerDataExport
set PropertyType "S3BucketPrefix" CapacityManagerDataExport
newValue CapacityManagerDataExport {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CapacityManagerDataExport -> ()
outputFormat :: CapacityManagerDataExport -> Value Text
s3BucketName :: CapacityManagerDataExport -> Value Text
s3BucketPrefix :: CapacityManagerDataExport -> Maybe (Value Text)
schedule :: CapacityManagerDataExport -> Value Text
tags :: CapacityManagerDataExport -> Maybe [Tag]
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
..}
    = CapacityManagerDataExport
        {s3BucketPrefix :: Maybe (Value Text)
s3BucketPrefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3BucketPrefix" CapacityManagerDataExport
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
schedule :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
schedule :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Schedule" CapacityManagerDataExport where
  type PropertyType "Schedule" CapacityManagerDataExport = Value Prelude.Text
  set :: PropertyType "Schedule" CapacityManagerDataExport
-> CapacityManagerDataExport -> CapacityManagerDataExport
set PropertyType "Schedule" CapacityManagerDataExport
newValue CapacityManagerDataExport {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CapacityManagerDataExport -> ()
outputFormat :: CapacityManagerDataExport -> Value Text
s3BucketName :: CapacityManagerDataExport -> Value Text
s3BucketPrefix :: CapacityManagerDataExport -> Maybe (Value Text)
schedule :: CapacityManagerDataExport -> Value Text
tags :: CapacityManagerDataExport -> Maybe [Tag]
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
..}
    = CapacityManagerDataExport {schedule :: Value Text
schedule = PropertyType "Schedule" CapacityManagerDataExport
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" CapacityManagerDataExport where
  type PropertyType "Tags" CapacityManagerDataExport = [Tag]
  set :: PropertyType "Tags" CapacityManagerDataExport
-> CapacityManagerDataExport -> CapacityManagerDataExport
set PropertyType "Tags" CapacityManagerDataExport
newValue CapacityManagerDataExport {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CapacityManagerDataExport -> ()
outputFormat :: CapacityManagerDataExport -> Value Text
s3BucketName :: CapacityManagerDataExport -> Value Text
s3BucketPrefix :: CapacityManagerDataExport -> Maybe (Value Text)
schedule :: CapacityManagerDataExport -> Value Text
tags :: CapacityManagerDataExport -> Maybe [Tag]
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
tags :: Maybe [Tag]
..}
    = CapacityManagerDataExport {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" CapacityManagerDataExport
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
haddock_workaround_ :: ()
outputFormat :: Value Text
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
schedule :: Value Text
..}