module Stratosphere.S3.Bucket.MetadataDestinationProperty (
        MetadataDestinationProperty(..), mkMetadataDestinationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MetadataDestinationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatadestination.html>
    MetadataDestinationProperty {MetadataDestinationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatadestination.html#cfn-s3-bucket-metadatadestination-tablebucketarn>
                                 MetadataDestinationProperty -> Maybe (Value Text)
tableBucketArn :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatadestination.html#cfn-s3-bucket-metadatadestination-tablebuckettype>
                                 MetadataDestinationProperty -> Value Text
tableBucketType :: (Value Prelude.Text),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatadestination.html#cfn-s3-bucket-metadatadestination-tablenamespace>
                                 MetadataDestinationProperty -> Maybe (Value Text)
tableNamespace :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (MetadataDestinationProperty -> MetadataDestinationProperty -> Bool
(MetadataDestinationProperty
 -> MetadataDestinationProperty -> Bool)
-> (MetadataDestinationProperty
    -> MetadataDestinationProperty -> Bool)
-> Eq MetadataDestinationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MetadataDestinationProperty -> MetadataDestinationProperty -> Bool
== :: MetadataDestinationProperty -> MetadataDestinationProperty -> Bool
$c/= :: MetadataDestinationProperty -> MetadataDestinationProperty -> Bool
/= :: MetadataDestinationProperty -> MetadataDestinationProperty -> Bool
Prelude.Eq, Int -> MetadataDestinationProperty -> ShowS
[MetadataDestinationProperty] -> ShowS
MetadataDestinationProperty -> String
(Int -> MetadataDestinationProperty -> ShowS)
-> (MetadataDestinationProperty -> String)
-> ([MetadataDestinationProperty] -> ShowS)
-> Show MetadataDestinationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MetadataDestinationProperty -> ShowS
showsPrec :: Int -> MetadataDestinationProperty -> ShowS
$cshow :: MetadataDestinationProperty -> String
show :: MetadataDestinationProperty -> String
$cshowList :: [MetadataDestinationProperty] -> ShowS
showList :: [MetadataDestinationProperty] -> ShowS
Prelude.Show)
mkMetadataDestinationProperty ::
  Value Prelude.Text -> MetadataDestinationProperty
mkMetadataDestinationProperty :: Value Text -> MetadataDestinationProperty
mkMetadataDestinationProperty Value Text
tableBucketType
  = MetadataDestinationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), tableBucketType :: Value Text
tableBucketType = Value Text
tableBucketType,
       tableBucketArn :: Maybe (Value Text)
tableBucketArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tableNamespace :: Maybe (Value Text)
tableNamespace = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MetadataDestinationProperty where
  toResourceProperties :: MetadataDestinationProperty -> ResourceProperties
toResourceProperties MetadataDestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetadataDestinationProperty -> ()
tableBucketArn :: MetadataDestinationProperty -> Maybe (Value Text)
tableBucketType :: MetadataDestinationProperty -> Value Text
tableNamespace :: MetadataDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
tableBucketArn :: Maybe (Value Text)
tableBucketType :: Value Text
tableNamespace :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::Bucket.MetadataDestination",
         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
"TableBucketType" 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
tableBucketType]
                           ([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
"TableBucketArn" (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)
tableBucketArn,
                               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
"TableNamespace" (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)
tableNamespace]))}
instance JSON.ToJSON MetadataDestinationProperty where
  toJSON :: MetadataDestinationProperty -> Value
toJSON MetadataDestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetadataDestinationProperty -> ()
tableBucketArn :: MetadataDestinationProperty -> Maybe (Value Text)
tableBucketType :: MetadataDestinationProperty -> Value Text
tableNamespace :: MetadataDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
tableBucketArn :: Maybe (Value Text)
tableBucketType :: Value Text
tableNamespace :: 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
"TableBucketType" 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
tableBucketType]
              ([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
"TableBucketArn" (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)
tableBucketArn,
                  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
"TableNamespace" (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)
tableNamespace])))
instance Property "TableBucketArn" MetadataDestinationProperty where
  type PropertyType "TableBucketArn" MetadataDestinationProperty = Value Prelude.Text
  set :: PropertyType "TableBucketArn" MetadataDestinationProperty
-> MetadataDestinationProperty -> MetadataDestinationProperty
set PropertyType "TableBucketArn" MetadataDestinationProperty
newValue MetadataDestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetadataDestinationProperty -> ()
tableBucketArn :: MetadataDestinationProperty -> Maybe (Value Text)
tableBucketType :: MetadataDestinationProperty -> Value Text
tableNamespace :: MetadataDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
tableBucketArn :: Maybe (Value Text)
tableBucketType :: Value Text
tableNamespace :: Maybe (Value Text)
..}
    = MetadataDestinationProperty
        {tableBucketArn :: Maybe (Value Text)
tableBucketArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TableBucketArn" MetadataDestinationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
tableBucketType :: Value Text
tableNamespace :: Maybe (Value Text)
haddock_workaround_ :: ()
tableBucketType :: Value Text
tableNamespace :: Maybe (Value Text)
..}
instance Property "TableBucketType" MetadataDestinationProperty where
  type PropertyType "TableBucketType" MetadataDestinationProperty = Value Prelude.Text
  set :: PropertyType "TableBucketType" MetadataDestinationProperty
-> MetadataDestinationProperty -> MetadataDestinationProperty
set PropertyType "TableBucketType" MetadataDestinationProperty
newValue MetadataDestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetadataDestinationProperty -> ()
tableBucketArn :: MetadataDestinationProperty -> Maybe (Value Text)
tableBucketType :: MetadataDestinationProperty -> Value Text
tableNamespace :: MetadataDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
tableBucketArn :: Maybe (Value Text)
tableBucketType :: Value Text
tableNamespace :: Maybe (Value Text)
..}
    = MetadataDestinationProperty {tableBucketType :: Value Text
tableBucketType = PropertyType "TableBucketType" MetadataDestinationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
tableBucketArn :: Maybe (Value Text)
tableNamespace :: Maybe (Value Text)
haddock_workaround_ :: ()
tableBucketArn :: Maybe (Value Text)
tableNamespace :: Maybe (Value Text)
..}
instance Property "TableNamespace" MetadataDestinationProperty where
  type PropertyType "TableNamespace" MetadataDestinationProperty = Value Prelude.Text
  set :: PropertyType "TableNamespace" MetadataDestinationProperty
-> MetadataDestinationProperty -> MetadataDestinationProperty
set PropertyType "TableNamespace" MetadataDestinationProperty
newValue MetadataDestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetadataDestinationProperty -> ()
tableBucketArn :: MetadataDestinationProperty -> Maybe (Value Text)
tableBucketType :: MetadataDestinationProperty -> Value Text
tableNamespace :: MetadataDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
tableBucketArn :: Maybe (Value Text)
tableBucketType :: Value Text
tableNamespace :: Maybe (Value Text)
..}
    = MetadataDestinationProperty
        {tableNamespace :: Maybe (Value Text)
tableNamespace = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TableNamespace" MetadataDestinationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
tableBucketArn :: Maybe (Value Text)
tableBucketType :: Value Text
haddock_workaround_ :: ()
tableBucketArn :: Maybe (Value Text)
tableBucketType :: Value Text
..}