module Stratosphere.AppFlow.Flow.AggregationConfigProperty (
        AggregationConfigProperty(..), mkAggregationConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AggregationConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-aggregationconfig.html>
    AggregationConfigProperty {AggregationConfigProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-aggregationconfig.html#cfn-appflow-flow-aggregationconfig-aggregationtype>
                               AggregationConfigProperty -> Maybe (Value Text)
aggregationType :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-aggregationconfig.html#cfn-appflow-flow-aggregationconfig-targetfilesize>
                               AggregationConfigProperty -> Maybe (Value Integer)
targetFileSize :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (AggregationConfigProperty -> AggregationConfigProperty -> Bool
(AggregationConfigProperty -> AggregationConfigProperty -> Bool)
-> (AggregationConfigProperty -> AggregationConfigProperty -> Bool)
-> Eq AggregationConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AggregationConfigProperty -> AggregationConfigProperty -> Bool
== :: AggregationConfigProperty -> AggregationConfigProperty -> Bool
$c/= :: AggregationConfigProperty -> AggregationConfigProperty -> Bool
/= :: AggregationConfigProperty -> AggregationConfigProperty -> Bool
Prelude.Eq, Int -> AggregationConfigProperty -> ShowS
[AggregationConfigProperty] -> ShowS
AggregationConfigProperty -> String
(Int -> AggregationConfigProperty -> ShowS)
-> (AggregationConfigProperty -> String)
-> ([AggregationConfigProperty] -> ShowS)
-> Show AggregationConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AggregationConfigProperty -> ShowS
showsPrec :: Int -> AggregationConfigProperty -> ShowS
$cshow :: AggregationConfigProperty -> String
show :: AggregationConfigProperty -> String
$cshowList :: [AggregationConfigProperty] -> ShowS
showList :: [AggregationConfigProperty] -> ShowS
Prelude.Show)
mkAggregationConfigProperty :: AggregationConfigProperty
mkAggregationConfigProperty :: AggregationConfigProperty
mkAggregationConfigProperty
  = AggregationConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), aggregationType :: Maybe (Value Text)
aggregationType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       targetFileSize :: Maybe (Value Integer)
targetFileSize = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AggregationConfigProperty where
  toResourceProperties :: AggregationConfigProperty -> ResourceProperties
toResourceProperties AggregationConfigProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: AggregationConfigProperty -> ()
aggregationType :: AggregationConfigProperty -> Maybe (Value Text)
targetFileSize :: AggregationConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
aggregationType :: Maybe (Value Text)
targetFileSize :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppFlow::Flow.AggregationConfig",
         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
"AggregationType" (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)
aggregationType,
                            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
"TargetFileSize" (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)
targetFileSize])}
instance JSON.ToJSON AggregationConfigProperty where
  toJSON :: AggregationConfigProperty -> Value
toJSON AggregationConfigProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: AggregationConfigProperty -> ()
aggregationType :: AggregationConfigProperty -> Maybe (Value Text)
targetFileSize :: AggregationConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
aggregationType :: Maybe (Value Text)
targetFileSize :: Maybe (Value Integer)
..}
    = [(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
"AggregationType" (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)
aggregationType,
               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
"TargetFileSize" (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)
targetFileSize]))
instance Property "AggregationType" AggregationConfigProperty where
  type PropertyType "AggregationType" AggregationConfigProperty = Value Prelude.Text
  set :: PropertyType "AggregationType" AggregationConfigProperty
-> AggregationConfigProperty -> AggregationConfigProperty
set PropertyType "AggregationType" AggregationConfigProperty
newValue AggregationConfigProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: AggregationConfigProperty -> ()
aggregationType :: AggregationConfigProperty -> Maybe (Value Text)
targetFileSize :: AggregationConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
aggregationType :: Maybe (Value Text)
targetFileSize :: Maybe (Value Integer)
..}
    = AggregationConfigProperty
        {aggregationType :: Maybe (Value Text)
aggregationType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AggregationType" AggregationConfigProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
targetFileSize :: Maybe (Value Integer)
haddock_workaround_ :: ()
targetFileSize :: Maybe (Value Integer)
..}
instance Property "TargetFileSize" AggregationConfigProperty where
  type PropertyType "TargetFileSize" AggregationConfigProperty = Value Prelude.Integer
  set :: PropertyType "TargetFileSize" AggregationConfigProperty
-> AggregationConfigProperty -> AggregationConfigProperty
set PropertyType "TargetFileSize" AggregationConfigProperty
newValue AggregationConfigProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: AggregationConfigProperty -> ()
aggregationType :: AggregationConfigProperty -> Maybe (Value Text)
targetFileSize :: AggregationConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
aggregationType :: Maybe (Value Text)
targetFileSize :: Maybe (Value Integer)
..}
    = AggregationConfigProperty
        {targetFileSize :: Maybe (Value Integer)
targetFileSize = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TargetFileSize" AggregationConfigProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
aggregationType :: Maybe (Value Text)
haddock_workaround_ :: ()
aggregationType :: Maybe (Value Text)
..}