module Stratosphere.KafkaConnect.CustomPlugin.S3LocationProperty (
S3LocationProperty(..), mkS3LocationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3LocationProperty
=
S3LocationProperty {S3LocationProperty -> ()
haddock_workaround_ :: (),
S3LocationProperty -> Value Text
bucketArn :: (Value Prelude.Text),
S3LocationProperty -> Value Text
fileKey :: (Value Prelude.Text),
S3LocationProperty -> Maybe (Value Text)
objectVersion :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (S3LocationProperty -> S3LocationProperty -> Bool
(S3LocationProperty -> S3LocationProperty -> Bool)
-> (S3LocationProperty -> S3LocationProperty -> Bool)
-> Eq S3LocationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3LocationProperty -> S3LocationProperty -> Bool
== :: S3LocationProperty -> S3LocationProperty -> Bool
$c/= :: S3LocationProperty -> S3LocationProperty -> Bool
/= :: S3LocationProperty -> S3LocationProperty -> Bool
Prelude.Eq, Int -> S3LocationProperty -> ShowS
[S3LocationProperty] -> ShowS
S3LocationProperty -> String
(Int -> S3LocationProperty -> ShowS)
-> (S3LocationProperty -> String)
-> ([S3LocationProperty] -> ShowS)
-> Show S3LocationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3LocationProperty -> ShowS
showsPrec :: Int -> S3LocationProperty -> ShowS
$cshow :: S3LocationProperty -> String
show :: S3LocationProperty -> String
$cshowList :: [S3LocationProperty] -> ShowS
showList :: [S3LocationProperty] -> ShowS
Prelude.Show)
mkS3LocationProperty ::
Value Prelude.Text -> Value Prelude.Text -> S3LocationProperty
mkS3LocationProperty :: Value Text -> Value Text -> S3LocationProperty
mkS3LocationProperty Value Text
bucketArn Value Text
fileKey
= S3LocationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), bucketArn :: Value Text
bucketArn = Value Text
bucketArn,
fileKey :: Value Text
fileKey = Value Text
fileKey, objectVersion :: Maybe (Value Text)
objectVersion = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3LocationProperty where
toResourceProperties :: S3LocationProperty -> ResourceProperties
toResourceProperties S3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3LocationProperty -> ()
bucketArn :: S3LocationProperty -> Value Text
fileKey :: S3LocationProperty -> Value Text
objectVersion :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketArn :: Value Text
fileKey :: Value Text
objectVersion :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::KafkaConnect::CustomPlugin.S3Location",
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
"BucketArn" 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
bucketArn, Key
"FileKey" 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
fileKey]
([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
"ObjectVersion" (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)
objectVersion]))}
instance JSON.ToJSON S3LocationProperty where
toJSON :: S3LocationProperty -> Value
toJSON S3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3LocationProperty -> ()
bucketArn :: S3LocationProperty -> Value Text
fileKey :: S3LocationProperty -> Value Text
objectVersion :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketArn :: Value Text
fileKey :: Value Text
objectVersion :: 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
"BucketArn" 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
bucketArn, Key
"FileKey" 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
fileKey]
([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
"ObjectVersion" (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)
objectVersion])))
instance Property "BucketArn" S3LocationProperty where
type PropertyType "BucketArn" S3LocationProperty = Value Prelude.Text
set :: PropertyType "BucketArn" S3LocationProperty
-> S3LocationProperty -> S3LocationProperty
set PropertyType "BucketArn" S3LocationProperty
newValue S3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3LocationProperty -> ()
bucketArn :: S3LocationProperty -> Value Text
fileKey :: S3LocationProperty -> Value Text
objectVersion :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketArn :: Value Text
fileKey :: Value Text
objectVersion :: Maybe (Value Text)
..}
= S3LocationProperty {bucketArn :: Value Text
bucketArn = PropertyType "BucketArn" S3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
fileKey :: Value Text
objectVersion :: Maybe (Value Text)
haddock_workaround_ :: ()
fileKey :: Value Text
objectVersion :: Maybe (Value Text)
..}
instance Property "FileKey" S3LocationProperty where
type PropertyType "FileKey" S3LocationProperty = Value Prelude.Text
set :: PropertyType "FileKey" S3LocationProperty
-> S3LocationProperty -> S3LocationProperty
set PropertyType "FileKey" S3LocationProperty
newValue S3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3LocationProperty -> ()
bucketArn :: S3LocationProperty -> Value Text
fileKey :: S3LocationProperty -> Value Text
objectVersion :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketArn :: Value Text
fileKey :: Value Text
objectVersion :: Maybe (Value Text)
..}
= S3LocationProperty {fileKey :: Value Text
fileKey = PropertyType "FileKey" S3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucketArn :: Value Text
objectVersion :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketArn :: Value Text
objectVersion :: Maybe (Value Text)
..}
instance Property "ObjectVersion" S3LocationProperty where
type PropertyType "ObjectVersion" S3LocationProperty = Value Prelude.Text
set :: PropertyType "ObjectVersion" S3LocationProperty
-> S3LocationProperty -> S3LocationProperty
set PropertyType "ObjectVersion" S3LocationProperty
newValue S3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3LocationProperty -> ()
bucketArn :: S3LocationProperty -> Value Text
fileKey :: S3LocationProperty -> Value Text
objectVersion :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketArn :: Value Text
fileKey :: Value Text
objectVersion :: Maybe (Value Text)
..}
= S3LocationProperty {objectVersion :: Maybe (Value Text)
objectVersion = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ObjectVersion" S3LocationProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
bucketArn :: Value Text
fileKey :: Value Text
haddock_workaround_ :: ()
bucketArn :: Value Text
fileKey :: Value Text
..}