module Stratosphere.DataSync.LocationS3 (
        module Exports, LocationS3(..), mkLocationS3
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.DataSync.LocationS3.S3ConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data LocationS3
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locations3.html>
    LocationS3 {LocationS3 -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locations3.html#cfn-datasync-locations3-s3bucketarn>
                LocationS3 -> Maybe (Value Text)
s3BucketArn :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locations3.html#cfn-datasync-locations3-s3config>
                LocationS3 -> S3ConfigProperty
s3Config :: S3ConfigProperty,
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locations3.html#cfn-datasync-locations3-s3storageclass>
                LocationS3 -> Maybe (Value Text)
s3StorageClass :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locations3.html#cfn-datasync-locations3-subdirectory>
                LocationS3 -> Maybe (Value Text)
subdirectory :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locations3.html#cfn-datasync-locations3-tags>
                LocationS3 -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (LocationS3 -> LocationS3 -> Bool
(LocationS3 -> LocationS3 -> Bool)
-> (LocationS3 -> LocationS3 -> Bool) -> Eq LocationS3
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LocationS3 -> LocationS3 -> Bool
== :: LocationS3 -> LocationS3 -> Bool
$c/= :: LocationS3 -> LocationS3 -> Bool
/= :: LocationS3 -> LocationS3 -> Bool
Prelude.Eq, Int -> LocationS3 -> ShowS
[LocationS3] -> ShowS
LocationS3 -> String
(Int -> LocationS3 -> ShowS)
-> (LocationS3 -> String)
-> ([LocationS3] -> ShowS)
-> Show LocationS3
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LocationS3 -> ShowS
showsPrec :: Int -> LocationS3 -> ShowS
$cshow :: LocationS3 -> String
show :: LocationS3 -> String
$cshowList :: [LocationS3] -> ShowS
showList :: [LocationS3] -> ShowS
Prelude.Show)
mkLocationS3 :: S3ConfigProperty -> LocationS3
mkLocationS3 :: S3ConfigProperty -> LocationS3
mkLocationS3 S3ConfigProperty
s3Config
  = LocationS3
      {haddock_workaround_ :: ()
haddock_workaround_ = (), s3Config :: S3ConfigProperty
s3Config = S3ConfigProperty
s3Config,
       s3BucketArn :: Maybe (Value Text)
s3BucketArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, s3StorageClass :: Maybe (Value Text)
s3StorageClass = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       subdirectory :: Maybe (Value Text)
subdirectory = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LocationS3 where
  toResourceProperties :: LocationS3 -> ResourceProperties
toResourceProperties LocationS3 {Maybe [Tag]
Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: LocationS3 -> ()
s3BucketArn :: LocationS3 -> Maybe (Value Text)
s3Config :: LocationS3 -> S3ConfigProperty
s3StorageClass :: LocationS3 -> Maybe (Value Text)
subdirectory :: LocationS3 -> Maybe (Value Text)
tags :: LocationS3 -> Maybe [Tag]
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataSync::LocationS3",
         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
"S3Config" Key -> S3ConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= S3ConfigProperty
s3Config]
                           ([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
"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
"S3StorageClass" (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)
s3StorageClass,
                               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,
                               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 LocationS3 where
  toJSON :: LocationS3 -> Value
toJSON LocationS3 {Maybe [Tag]
Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: LocationS3 -> ()
s3BucketArn :: LocationS3 -> Maybe (Value Text)
s3Config :: LocationS3 -> S3ConfigProperty
s3StorageClass :: LocationS3 -> Maybe (Value Text)
subdirectory :: LocationS3 -> Maybe (Value Text)
tags :: LocationS3 -> Maybe [Tag]
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (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
"S3Config" Key -> S3ConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= S3ConfigProperty
s3Config]
              ([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
"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
"S3StorageClass" (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)
s3StorageClass,
                  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,
                  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 "S3BucketArn" LocationS3 where
  type PropertyType "S3BucketArn" LocationS3 = Value Prelude.Text
  set :: PropertyType "S3BucketArn" LocationS3 -> LocationS3 -> LocationS3
set PropertyType "S3BucketArn" LocationS3
newValue LocationS3 {Maybe [Tag]
Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: LocationS3 -> ()
s3BucketArn :: LocationS3 -> Maybe (Value Text)
s3Config :: LocationS3 -> S3ConfigProperty
s3StorageClass :: LocationS3 -> Maybe (Value Text)
subdirectory :: LocationS3 -> Maybe (Value Text)
tags :: LocationS3 -> Maybe [Tag]
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = LocationS3 {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" LocationS3
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: ()
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "S3Config" LocationS3 where
  type PropertyType "S3Config" LocationS3 = S3ConfigProperty
  set :: PropertyType "S3Config" LocationS3 -> LocationS3 -> LocationS3
set PropertyType "S3Config" LocationS3
newValue LocationS3 {Maybe [Tag]
Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: LocationS3 -> ()
s3BucketArn :: LocationS3 -> Maybe (Value Text)
s3Config :: LocationS3 -> S3ConfigProperty
s3StorageClass :: LocationS3 -> Maybe (Value Text)
subdirectory :: LocationS3 -> Maybe (Value Text)
tags :: LocationS3 -> Maybe [Tag]
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
..} = LocationS3 {s3Config :: S3ConfigProperty
s3Config = PropertyType "S3Config" LocationS3
S3ConfigProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "S3StorageClass" LocationS3 where
  type PropertyType "S3StorageClass" LocationS3 = Value Prelude.Text
  set :: PropertyType "S3StorageClass" LocationS3
-> LocationS3 -> LocationS3
set PropertyType "S3StorageClass" LocationS3
newValue LocationS3 {Maybe [Tag]
Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: LocationS3 -> ()
s3BucketArn :: LocationS3 -> Maybe (Value Text)
s3Config :: LocationS3 -> S3ConfigProperty
s3StorageClass :: LocationS3 -> Maybe (Value Text)
subdirectory :: LocationS3 -> Maybe (Value Text)
tags :: LocationS3 -> Maybe [Tag]
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = LocationS3 {s3StorageClass :: Maybe (Value Text)
s3StorageClass = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3StorageClass" LocationS3
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Subdirectory" LocationS3 where
  type PropertyType "Subdirectory" LocationS3 = Value Prelude.Text
  set :: PropertyType "Subdirectory" LocationS3 -> LocationS3 -> LocationS3
set PropertyType "Subdirectory" LocationS3
newValue LocationS3 {Maybe [Tag]
Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: LocationS3 -> ()
s3BucketArn :: LocationS3 -> Maybe (Value Text)
s3Config :: LocationS3 -> S3ConfigProperty
s3StorageClass :: LocationS3 -> Maybe (Value Text)
subdirectory :: LocationS3 -> Maybe (Value Text)
tags :: LocationS3 -> Maybe [Tag]
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = LocationS3 {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" LocationS3
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" LocationS3 where
  type PropertyType "Tags" LocationS3 = [Tag]
  set :: PropertyType "Tags" LocationS3 -> LocationS3 -> LocationS3
set PropertyType "Tags" LocationS3
newValue LocationS3 {Maybe [Tag]
Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: LocationS3 -> ()
s3BucketArn :: LocationS3 -> Maybe (Value Text)
s3Config :: LocationS3 -> S3ConfigProperty
s3StorageClass :: LocationS3 -> Maybe (Value Text)
subdirectory :: LocationS3 -> Maybe (Value Text)
tags :: LocationS3 -> Maybe [Tag]
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = LocationS3 {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" LocationS3
newValue, Maybe (Value Text)
()
S3ConfigProperty
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
haddock_workaround_ :: ()
s3BucketArn :: Maybe (Value Text)
s3Config :: S3ConfigProperty
s3StorageClass :: Maybe (Value Text)
subdirectory :: Maybe (Value Text)
..}