module Stratosphere.DataSync.Task.ManifestConfigProperty (
        module Exports, ManifestConfigProperty(..),
        mkManifestConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.DataSync.Task.SourceProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ManifestConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfig.html>
    ManifestConfigProperty {ManifestConfigProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfig.html#cfn-datasync-task-manifestconfig-action>
                            ManifestConfigProperty -> Maybe (Value Text)
action :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfig.html#cfn-datasync-task-manifestconfig-format>
                            ManifestConfigProperty -> Maybe (Value Text)
format :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfig.html#cfn-datasync-task-manifestconfig-source>
                            ManifestConfigProperty -> SourceProperty
source :: SourceProperty}
  deriving stock (ManifestConfigProperty -> ManifestConfigProperty -> Bool
(ManifestConfigProperty -> ManifestConfigProperty -> Bool)
-> (ManifestConfigProperty -> ManifestConfigProperty -> Bool)
-> Eq ManifestConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ManifestConfigProperty -> ManifestConfigProperty -> Bool
== :: ManifestConfigProperty -> ManifestConfigProperty -> Bool
$c/= :: ManifestConfigProperty -> ManifestConfigProperty -> Bool
/= :: ManifestConfigProperty -> ManifestConfigProperty -> Bool
Prelude.Eq, Int -> ManifestConfigProperty -> ShowS
[ManifestConfigProperty] -> ShowS
ManifestConfigProperty -> String
(Int -> ManifestConfigProperty -> ShowS)
-> (ManifestConfigProperty -> String)
-> ([ManifestConfigProperty] -> ShowS)
-> Show ManifestConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ManifestConfigProperty -> ShowS
showsPrec :: Int -> ManifestConfigProperty -> ShowS
$cshow :: ManifestConfigProperty -> String
show :: ManifestConfigProperty -> String
$cshowList :: [ManifestConfigProperty] -> ShowS
showList :: [ManifestConfigProperty] -> ShowS
Prelude.Show)
mkManifestConfigProperty ::
  SourceProperty -> ManifestConfigProperty
mkManifestConfigProperty :: SourceProperty -> ManifestConfigProperty
mkManifestConfigProperty SourceProperty
source
  = ManifestConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), source :: SourceProperty
source = SourceProperty
source,
       action :: Maybe (Value Text)
action = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, format :: Maybe (Value Text)
format = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ManifestConfigProperty where
  toResourceProperties :: ManifestConfigProperty -> ResourceProperties
toResourceProperties ManifestConfigProperty {Maybe (Value Text)
()
SourceProperty
haddock_workaround_ :: ManifestConfigProperty -> ()
action :: ManifestConfigProperty -> Maybe (Value Text)
format :: ManifestConfigProperty -> Maybe (Value Text)
source :: ManifestConfigProperty -> SourceProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
format :: Maybe (Value Text)
source :: SourceProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataSync::Task.ManifestConfig",
         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
"Source" Key -> SourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= SourceProperty
source]
                           ([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
"Action" (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)
action,
                               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
"Format" (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)
format]))}
instance JSON.ToJSON ManifestConfigProperty where
  toJSON :: ManifestConfigProperty -> Value
toJSON ManifestConfigProperty {Maybe (Value Text)
()
SourceProperty
haddock_workaround_ :: ManifestConfigProperty -> ()
action :: ManifestConfigProperty -> Maybe (Value Text)
format :: ManifestConfigProperty -> Maybe (Value Text)
source :: ManifestConfigProperty -> SourceProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
format :: Maybe (Value Text)
source :: SourceProperty
..}
    = [(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
"Source" Key -> SourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= SourceProperty
source]
              ([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
"Action" (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)
action,
                  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
"Format" (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)
format])))
instance Property "Action" ManifestConfigProperty where
  type PropertyType "Action" ManifestConfigProperty = Value Prelude.Text
  set :: PropertyType "Action" ManifestConfigProperty
-> ManifestConfigProperty -> ManifestConfigProperty
set PropertyType "Action" ManifestConfigProperty
newValue ManifestConfigProperty {Maybe (Value Text)
()
SourceProperty
haddock_workaround_ :: ManifestConfigProperty -> ()
action :: ManifestConfigProperty -> Maybe (Value Text)
format :: ManifestConfigProperty -> Maybe (Value Text)
source :: ManifestConfigProperty -> SourceProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
format :: Maybe (Value Text)
source :: SourceProperty
..}
    = ManifestConfigProperty {action :: Maybe (Value Text)
action = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Action" ManifestConfigProperty
Value Text
newValue, Maybe (Value Text)
()
SourceProperty
haddock_workaround_ :: ()
format :: Maybe (Value Text)
source :: SourceProperty
haddock_workaround_ :: ()
format :: Maybe (Value Text)
source :: SourceProperty
..}
instance Property "Format" ManifestConfigProperty where
  type PropertyType "Format" ManifestConfigProperty = Value Prelude.Text
  set :: PropertyType "Format" ManifestConfigProperty
-> ManifestConfigProperty -> ManifestConfigProperty
set PropertyType "Format" ManifestConfigProperty
newValue ManifestConfigProperty {Maybe (Value Text)
()
SourceProperty
haddock_workaround_ :: ManifestConfigProperty -> ()
action :: ManifestConfigProperty -> Maybe (Value Text)
format :: ManifestConfigProperty -> Maybe (Value Text)
source :: ManifestConfigProperty -> SourceProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
format :: Maybe (Value Text)
source :: SourceProperty
..}
    = ManifestConfigProperty {format :: Maybe (Value Text)
format = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Format" ManifestConfigProperty
Value Text
newValue, Maybe (Value Text)
()
SourceProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
source :: SourceProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
source :: SourceProperty
..}
instance Property "Source" ManifestConfigProperty where
  type PropertyType "Source" ManifestConfigProperty = SourceProperty
  set :: PropertyType "Source" ManifestConfigProperty
-> ManifestConfigProperty -> ManifestConfigProperty
set PropertyType "Source" ManifestConfigProperty
newValue ManifestConfigProperty {Maybe (Value Text)
()
SourceProperty
haddock_workaround_ :: ManifestConfigProperty -> ()
action :: ManifestConfigProperty -> Maybe (Value Text)
format :: ManifestConfigProperty -> Maybe (Value Text)
source :: ManifestConfigProperty -> SourceProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
format :: Maybe (Value Text)
source :: SourceProperty
..}
    = ManifestConfigProperty {source :: SourceProperty
source = PropertyType "Source" ManifestConfigProperty
SourceProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
action :: Maybe (Value Text)
format :: Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
format :: Maybe (Value Text)
..}