module Stratosphere.DataSync.Task.TaskReportConfigDestinationS3Property (
        TaskReportConfigDestinationS3Property(..),
        mkTaskReportConfigDestinationS3Property
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TaskReportConfigDestinationS3Property
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskreportconfigdestinations3.html>
    TaskReportConfigDestinationS3Property {TaskReportConfigDestinationS3Property -> ()
haddock_workaround_ :: (),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskreportconfigdestinations3.html#cfn-datasync-task-taskreportconfigdestinations3-bucketaccessrolearn>
                                           TaskReportConfigDestinationS3Property -> Maybe (Value Text)
bucketAccessRoleArn :: (Prelude.Maybe (Value Prelude.Text)),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskreportconfigdestinations3.html#cfn-datasync-task-taskreportconfigdestinations3-s3bucketarn>
                                           TaskReportConfigDestinationS3Property -> Maybe (Value Text)
s3BucketArn :: (Prelude.Maybe (Value Prelude.Text)),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskreportconfigdestinations3.html#cfn-datasync-task-taskreportconfigdestinations3-subdirectory>
                                           TaskReportConfigDestinationS3Property -> Maybe (Value Text)
subdirectory :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property -> Bool
(TaskReportConfigDestinationS3Property
 -> TaskReportConfigDestinationS3Property -> Bool)
-> (TaskReportConfigDestinationS3Property
    -> TaskReportConfigDestinationS3Property -> Bool)
-> Eq TaskReportConfigDestinationS3Property
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property -> Bool
== :: TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property -> Bool
$c/= :: TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property -> Bool
/= :: TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property -> Bool
Prelude.Eq, Int -> TaskReportConfigDestinationS3Property -> ShowS
[TaskReportConfigDestinationS3Property] -> ShowS
TaskReportConfigDestinationS3Property -> String
(Int -> TaskReportConfigDestinationS3Property -> ShowS)
-> (TaskReportConfigDestinationS3Property -> String)
-> ([TaskReportConfigDestinationS3Property] -> ShowS)
-> Show TaskReportConfigDestinationS3Property
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TaskReportConfigDestinationS3Property -> ShowS
showsPrec :: Int -> TaskReportConfigDestinationS3Property -> ShowS
$cshow :: TaskReportConfigDestinationS3Property -> String
show :: TaskReportConfigDestinationS3Property -> String
$cshowList :: [TaskReportConfigDestinationS3Property] -> ShowS
showList :: [TaskReportConfigDestinationS3Property] -> ShowS
Prelude.Show)
mkTaskReportConfigDestinationS3Property ::
  TaskReportConfigDestinationS3Property
mkTaskReportConfigDestinationS3Property :: TaskReportConfigDestinationS3Property
mkTaskReportConfigDestinationS3Property
  = TaskReportConfigDestinationS3Property
      {haddock_workaround_ :: ()
haddock_workaround_ = (), bucketAccessRoleArn :: Maybe (Value Text)
bucketAccessRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       s3BucketArn :: Maybe (Value Text)
s3BucketArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, subdirectory :: Maybe (Value Text)
subdirectory = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TaskReportConfigDestinationS3Property where
  toResourceProperties :: TaskReportConfigDestinationS3Property -> ResourceProperties
toResourceProperties TaskReportConfigDestinationS3Property {Maybe (Value Text)
()
haddock_workaround_ :: TaskReportConfigDestinationS3Property -> ()
bucketAccessRoleArn :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
s3BucketArn :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
subdirectory :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccessRoleArn :: Maybe (Value Text)
s3BucketArn :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataSync::Task.TaskReportConfigDestinationS3",
         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
"BucketAccessRoleArn" (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)
bucketAccessRoleArn,
                            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
"S3BucketArn" (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)
s3BucketArn,
                            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
"Subdirectory" (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)
subdirectory])}
instance JSON.ToJSON TaskReportConfigDestinationS3Property where
  toJSON :: TaskReportConfigDestinationS3Property -> Value
toJSON TaskReportConfigDestinationS3Property {Maybe (Value Text)
()
haddock_workaround_ :: TaskReportConfigDestinationS3Property -> ()
bucketAccessRoleArn :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
s3BucketArn :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
subdirectory :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccessRoleArn :: Maybe (Value Text)
s3BucketArn :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
..}
    = [(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
"BucketAccessRoleArn" (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)
bucketAccessRoleArn,
               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
"S3BucketArn" (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)
s3BucketArn,
               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
"Subdirectory" (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)
subdirectory]))
instance Property "BucketAccessRoleArn" TaskReportConfigDestinationS3Property where
  type PropertyType "BucketAccessRoleArn" TaskReportConfigDestinationS3Property = Value Prelude.Text
  set :: PropertyType
  "BucketAccessRoleArn" TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property
set PropertyType
  "BucketAccessRoleArn" TaskReportConfigDestinationS3Property
newValue TaskReportConfigDestinationS3Property {Maybe (Value Text)
()
haddock_workaround_ :: TaskReportConfigDestinationS3Property -> ()
bucketAccessRoleArn :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
s3BucketArn :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
subdirectory :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccessRoleArn :: Maybe (Value Text)
s3BucketArn :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
..}
    = TaskReportConfigDestinationS3Property
        {bucketAccessRoleArn :: Maybe (Value Text)
bucketAccessRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "BucketAccessRoleArn" TaskReportConfigDestinationS3Property
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
..}
instance Property "S3BucketArn" TaskReportConfigDestinationS3Property where
  type PropertyType "S3BucketArn" TaskReportConfigDestinationS3Property = Value Prelude.Text
  set :: PropertyType "S3BucketArn" TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property
set PropertyType "S3BucketArn" TaskReportConfigDestinationS3Property
newValue TaskReportConfigDestinationS3Property {Maybe (Value Text)
()
haddock_workaround_ :: TaskReportConfigDestinationS3Property -> ()
bucketAccessRoleArn :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
s3BucketArn :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
subdirectory :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccessRoleArn :: Maybe (Value Text)
s3BucketArn :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
..}
    = TaskReportConfigDestinationS3Property
        {s3BucketArn :: Maybe (Value Text)
s3BucketArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3BucketArn" TaskReportConfigDestinationS3Property
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketAccessRoleArn :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccessRoleArn :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
..}
instance Property "Subdirectory" TaskReportConfigDestinationS3Property where
  type PropertyType "Subdirectory" TaskReportConfigDestinationS3Property = Value Prelude.Text
  set :: PropertyType "Subdirectory" TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property
-> TaskReportConfigDestinationS3Property
set PropertyType "Subdirectory" TaskReportConfigDestinationS3Property
newValue TaskReportConfigDestinationS3Property {Maybe (Value Text)
()
haddock_workaround_ :: TaskReportConfigDestinationS3Property -> ()
bucketAccessRoleArn :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
s3BucketArn :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
subdirectory :: TaskReportConfigDestinationS3Property -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccessRoleArn :: Maybe (Value Text)
s3BucketArn :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
..}
    = TaskReportConfigDestinationS3Property
        {subdirectory :: Maybe (Value Text)
subdirectory = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Subdirectory" TaskReportConfigDestinationS3Property
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketAccessRoleArn :: Maybe (Value Text)
s3BucketArn :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccessRoleArn :: Maybe (Value Text)
s3BucketArn :: Maybe (Value Text)
..}