module Stratosphere.S3.StorageLens.S3BucketDestinationProperty (
        module Exports, S3BucketDestinationProperty(..),
        mkS3BucketDestinationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.StorageLens.EncryptionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3BucketDestinationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html>
    S3BucketDestinationProperty {S3BucketDestinationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-accountid>
                                 S3BucketDestinationProperty -> Value Text
accountId :: (Value Prelude.Text),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-arn>
                                 S3BucketDestinationProperty -> Value Text
arn :: (Value Prelude.Text),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-encryption>
                                 S3BucketDestinationProperty -> Maybe EncryptionProperty
encryption :: (Prelude.Maybe EncryptionProperty),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-format>
                                 S3BucketDestinationProperty -> Value Text
format :: (Value Prelude.Text),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-outputschemaversion>
                                 S3BucketDestinationProperty -> Value Text
outputSchemaVersion :: (Value Prelude.Text),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-prefix>
                                 S3BucketDestinationProperty -> Maybe (Value Text)
prefix :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (S3BucketDestinationProperty -> S3BucketDestinationProperty -> Bool
(S3BucketDestinationProperty
 -> S3BucketDestinationProperty -> Bool)
-> (S3BucketDestinationProperty
    -> S3BucketDestinationProperty -> Bool)
-> Eq S3BucketDestinationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3BucketDestinationProperty -> S3BucketDestinationProperty -> Bool
== :: S3BucketDestinationProperty -> S3BucketDestinationProperty -> Bool
$c/= :: S3BucketDestinationProperty -> S3BucketDestinationProperty -> Bool
/= :: S3BucketDestinationProperty -> S3BucketDestinationProperty -> Bool
Prelude.Eq, Int -> S3BucketDestinationProperty -> ShowS
[S3BucketDestinationProperty] -> ShowS
S3BucketDestinationProperty -> String
(Int -> S3BucketDestinationProperty -> ShowS)
-> (S3BucketDestinationProperty -> String)
-> ([S3BucketDestinationProperty] -> ShowS)
-> Show S3BucketDestinationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3BucketDestinationProperty -> ShowS
showsPrec :: Int -> S3BucketDestinationProperty -> ShowS
$cshow :: S3BucketDestinationProperty -> String
show :: S3BucketDestinationProperty -> String
$cshowList :: [S3BucketDestinationProperty] -> ShowS
showList :: [S3BucketDestinationProperty] -> ShowS
Prelude.Show)
mkS3BucketDestinationProperty ::
  Value Prelude.Text
  -> Value Prelude.Text
     -> Value Prelude.Text
        -> Value Prelude.Text -> S3BucketDestinationProperty
mkS3BucketDestinationProperty :: Value Text
-> Value Text
-> Value Text
-> Value Text
-> S3BucketDestinationProperty
mkS3BucketDestinationProperty
  Value Text
accountId
  Value Text
arn
  Value Text
format
  Value Text
outputSchemaVersion
  = S3BucketDestinationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), accountId :: Value Text
accountId = Value Text
accountId, arn :: Value Text
arn = Value Text
arn,
       format :: Value Text
format = Value Text
format, outputSchemaVersion :: Value Text
outputSchemaVersion = Value Text
outputSchemaVersion,
       encryption :: Maybe EncryptionProperty
encryption = Maybe EncryptionProperty
forall a. Maybe a
Prelude.Nothing, prefix :: Maybe (Value Text)
prefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3BucketDestinationProperty where
  toResourceProperties :: S3BucketDestinationProperty -> ResourceProperties
toResourceProperties S3BucketDestinationProperty {Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: S3BucketDestinationProperty -> ()
accountId :: S3BucketDestinationProperty -> Value Text
arn :: S3BucketDestinationProperty -> Value Text
encryption :: S3BucketDestinationProperty -> Maybe EncryptionProperty
format :: S3BucketDestinationProperty -> Value Text
outputSchemaVersion :: S3BucketDestinationProperty -> Value Text
prefix :: S3BucketDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::StorageLens.S3BucketDestination",
         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
"AccountId" 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
accountId, Key
"Arn" 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
arn,
                            Key
"Format" 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
format,
                            Key
"OutputSchemaVersion" 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
outputSchemaVersion]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> EncryptionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Encryption" (EncryptionProperty -> (Key, Value))
-> Maybe EncryptionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionProperty
encryption,
                               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
"Prefix" (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)
prefix]))}
instance JSON.ToJSON S3BucketDestinationProperty where
  toJSON :: S3BucketDestinationProperty -> Value
toJSON S3BucketDestinationProperty {Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: S3BucketDestinationProperty -> ()
accountId :: S3BucketDestinationProperty -> Value Text
arn :: S3BucketDestinationProperty -> Value Text
encryption :: S3BucketDestinationProperty -> Maybe EncryptionProperty
format :: S3BucketDestinationProperty -> Value Text
outputSchemaVersion :: S3BucketDestinationProperty -> Value Text
prefix :: S3BucketDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
    = [(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
"AccountId" 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
accountId, Key
"Arn" 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
arn,
               Key
"Format" 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
format,
               Key
"OutputSchemaVersion" 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
outputSchemaVersion]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> EncryptionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Encryption" (EncryptionProperty -> (Key, Value))
-> Maybe EncryptionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionProperty
encryption,
                  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
"Prefix" (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)
prefix])))
instance Property "AccountId" S3BucketDestinationProperty where
  type PropertyType "AccountId" S3BucketDestinationProperty = Value Prelude.Text
  set :: PropertyType "AccountId" S3BucketDestinationProperty
-> S3BucketDestinationProperty -> S3BucketDestinationProperty
set PropertyType "AccountId" S3BucketDestinationProperty
newValue S3BucketDestinationProperty {Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: S3BucketDestinationProperty -> ()
accountId :: S3BucketDestinationProperty -> Value Text
arn :: S3BucketDestinationProperty -> Value Text
encryption :: S3BucketDestinationProperty -> Maybe EncryptionProperty
format :: S3BucketDestinationProperty -> Value Text
outputSchemaVersion :: S3BucketDestinationProperty -> Value Text
prefix :: S3BucketDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
    = S3BucketDestinationProperty {accountId :: Value Text
accountId = PropertyType "AccountId" S3BucketDestinationProperty
Value Text
newValue, Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: ()
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
instance Property "Arn" S3BucketDestinationProperty where
  type PropertyType "Arn" S3BucketDestinationProperty = Value Prelude.Text
  set :: PropertyType "Arn" S3BucketDestinationProperty
-> S3BucketDestinationProperty -> S3BucketDestinationProperty
set PropertyType "Arn" S3BucketDestinationProperty
newValue S3BucketDestinationProperty {Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: S3BucketDestinationProperty -> ()
accountId :: S3BucketDestinationProperty -> Value Text
arn :: S3BucketDestinationProperty -> Value Text
encryption :: S3BucketDestinationProperty -> Maybe EncryptionProperty
format :: S3BucketDestinationProperty -> Value Text
outputSchemaVersion :: S3BucketDestinationProperty -> Value Text
prefix :: S3BucketDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
    = S3BucketDestinationProperty {arn :: Value Text
arn = PropertyType "Arn" S3BucketDestinationProperty
Value Text
newValue, Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: ()
accountId :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
instance Property "Encryption" S3BucketDestinationProperty where
  type PropertyType "Encryption" S3BucketDestinationProperty = EncryptionProperty
  set :: PropertyType "Encryption" S3BucketDestinationProperty
-> S3BucketDestinationProperty -> S3BucketDestinationProperty
set PropertyType "Encryption" S3BucketDestinationProperty
newValue S3BucketDestinationProperty {Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: S3BucketDestinationProperty -> ()
accountId :: S3BucketDestinationProperty -> Value Text
arn :: S3BucketDestinationProperty -> Value Text
encryption :: S3BucketDestinationProperty -> Maybe EncryptionProperty
format :: S3BucketDestinationProperty -> Value Text
outputSchemaVersion :: S3BucketDestinationProperty -> Value Text
prefix :: S3BucketDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
    = S3BucketDestinationProperty
        {encryption :: Maybe EncryptionProperty
encryption = EncryptionProperty -> Maybe EncryptionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Encryption" S3BucketDestinationProperty
EncryptionProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
instance Property "Format" S3BucketDestinationProperty where
  type PropertyType "Format" S3BucketDestinationProperty = Value Prelude.Text
  set :: PropertyType "Format" S3BucketDestinationProperty
-> S3BucketDestinationProperty -> S3BucketDestinationProperty
set PropertyType "Format" S3BucketDestinationProperty
newValue S3BucketDestinationProperty {Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: S3BucketDestinationProperty -> ()
accountId :: S3BucketDestinationProperty -> Value Text
arn :: S3BucketDestinationProperty -> Value Text
encryption :: S3BucketDestinationProperty -> Maybe EncryptionProperty
format :: S3BucketDestinationProperty -> Value Text
outputSchemaVersion :: S3BucketDestinationProperty -> Value Text
prefix :: S3BucketDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
    = S3BucketDestinationProperty {format :: Value Text
format = PropertyType "Format" S3BucketDestinationProperty
Value Text
newValue, Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
instance Property "OutputSchemaVersion" S3BucketDestinationProperty where
  type PropertyType "OutputSchemaVersion" S3BucketDestinationProperty = Value Prelude.Text
  set :: PropertyType "OutputSchemaVersion" S3BucketDestinationProperty
-> S3BucketDestinationProperty -> S3BucketDestinationProperty
set PropertyType "OutputSchemaVersion" S3BucketDestinationProperty
newValue S3BucketDestinationProperty {Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: S3BucketDestinationProperty -> ()
accountId :: S3BucketDestinationProperty -> Value Text
arn :: S3BucketDestinationProperty -> Value Text
encryption :: S3BucketDestinationProperty -> Maybe EncryptionProperty
format :: S3BucketDestinationProperty -> Value Text
outputSchemaVersion :: S3BucketDestinationProperty -> Value Text
prefix :: S3BucketDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
    = S3BucketDestinationProperty {outputSchemaVersion :: Value Text
outputSchemaVersion = PropertyType "OutputSchemaVersion" S3BucketDestinationProperty
Value Text
newValue, Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
prefix :: Maybe (Value Text)
..}
instance Property "Prefix" S3BucketDestinationProperty where
  type PropertyType "Prefix" S3BucketDestinationProperty = Value Prelude.Text
  set :: PropertyType "Prefix" S3BucketDestinationProperty
-> S3BucketDestinationProperty -> S3BucketDestinationProperty
set PropertyType "Prefix" S3BucketDestinationProperty
newValue S3BucketDestinationProperty {Maybe (Value Text)
Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: S3BucketDestinationProperty -> ()
accountId :: S3BucketDestinationProperty -> Value Text
arn :: S3BucketDestinationProperty -> Value Text
encryption :: S3BucketDestinationProperty -> Maybe EncryptionProperty
format :: S3BucketDestinationProperty -> Value Text
outputSchemaVersion :: S3BucketDestinationProperty -> Value Text
prefix :: S3BucketDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
prefix :: Maybe (Value Text)
..}
    = S3BucketDestinationProperty {prefix :: Maybe (Value Text)
prefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Prefix" S3BucketDestinationProperty
Value Text
newValue, Maybe EncryptionProperty
()
Value Text
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
haddock_workaround_ :: ()
accountId :: Value Text
arn :: Value Text
encryption :: Maybe EncryptionProperty
format :: Value Text
outputSchemaVersion :: Value Text
..}