{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.KinesisAnalytics.Types.S3ReferenceDataSource where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data S3ReferenceDataSource = S3ReferenceDataSource'
{
S3ReferenceDataSource -> Text
bucketARN :: Prelude.Text,
S3ReferenceDataSource -> Text
fileKey :: Prelude.Text,
S3ReferenceDataSource -> Text
referenceRoleARN :: Prelude.Text
}
deriving (S3ReferenceDataSource -> S3ReferenceDataSource -> Bool
(S3ReferenceDataSource -> S3ReferenceDataSource -> Bool)
-> (S3ReferenceDataSource -> S3ReferenceDataSource -> Bool)
-> Eq S3ReferenceDataSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3ReferenceDataSource -> S3ReferenceDataSource -> Bool
$c/= :: S3ReferenceDataSource -> S3ReferenceDataSource -> Bool
== :: S3ReferenceDataSource -> S3ReferenceDataSource -> Bool
$c== :: S3ReferenceDataSource -> S3ReferenceDataSource -> Bool
Prelude.Eq, ReadPrec [S3ReferenceDataSource]
ReadPrec S3ReferenceDataSource
Int -> ReadS S3ReferenceDataSource
ReadS [S3ReferenceDataSource]
(Int -> ReadS S3ReferenceDataSource)
-> ReadS [S3ReferenceDataSource]
-> ReadPrec S3ReferenceDataSource
-> ReadPrec [S3ReferenceDataSource]
-> Read S3ReferenceDataSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3ReferenceDataSource]
$creadListPrec :: ReadPrec [S3ReferenceDataSource]
readPrec :: ReadPrec S3ReferenceDataSource
$creadPrec :: ReadPrec S3ReferenceDataSource
readList :: ReadS [S3ReferenceDataSource]
$creadList :: ReadS [S3ReferenceDataSource]
readsPrec :: Int -> ReadS S3ReferenceDataSource
$creadsPrec :: Int -> ReadS S3ReferenceDataSource
Prelude.Read, Int -> S3ReferenceDataSource -> ShowS
[S3ReferenceDataSource] -> ShowS
S3ReferenceDataSource -> String
(Int -> S3ReferenceDataSource -> ShowS)
-> (S3ReferenceDataSource -> String)
-> ([S3ReferenceDataSource] -> ShowS)
-> Show S3ReferenceDataSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3ReferenceDataSource] -> ShowS
$cshowList :: [S3ReferenceDataSource] -> ShowS
show :: S3ReferenceDataSource -> String
$cshow :: S3ReferenceDataSource -> String
showsPrec :: Int -> S3ReferenceDataSource -> ShowS
$cshowsPrec :: Int -> S3ReferenceDataSource -> ShowS
Prelude.Show, (forall x. S3ReferenceDataSource -> Rep S3ReferenceDataSource x)
-> (forall x. Rep S3ReferenceDataSource x -> S3ReferenceDataSource)
-> Generic S3ReferenceDataSource
forall x. Rep S3ReferenceDataSource x -> S3ReferenceDataSource
forall x. S3ReferenceDataSource -> Rep S3ReferenceDataSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3ReferenceDataSource x -> S3ReferenceDataSource
$cfrom :: forall x. S3ReferenceDataSource -> Rep S3ReferenceDataSource x
Prelude.Generic)
newS3ReferenceDataSource ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
S3ReferenceDataSource
newS3ReferenceDataSource :: Text -> Text -> Text -> S3ReferenceDataSource
newS3ReferenceDataSource
Text
pBucketARN_
Text
pFileKey_
Text
pReferenceRoleARN_ =
S3ReferenceDataSource' :: Text -> Text -> Text -> S3ReferenceDataSource
S3ReferenceDataSource'
{ $sel:bucketARN:S3ReferenceDataSource' :: Text
bucketARN = Text
pBucketARN_,
$sel:fileKey:S3ReferenceDataSource' :: Text
fileKey = Text
pFileKey_,
$sel:referenceRoleARN:S3ReferenceDataSource' :: Text
referenceRoleARN = Text
pReferenceRoleARN_
}
s3ReferenceDataSource_bucketARN :: Lens.Lens' S3ReferenceDataSource Prelude.Text
s3ReferenceDataSource_bucketARN :: (Text -> f Text)
-> S3ReferenceDataSource -> f S3ReferenceDataSource
s3ReferenceDataSource_bucketARN = (S3ReferenceDataSource -> Text)
-> (S3ReferenceDataSource -> Text -> S3ReferenceDataSource)
-> Lens S3ReferenceDataSource S3ReferenceDataSource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ReferenceDataSource' {Text
bucketARN :: Text
$sel:bucketARN:S3ReferenceDataSource' :: S3ReferenceDataSource -> Text
bucketARN} -> Text
bucketARN) (\s :: S3ReferenceDataSource
s@S3ReferenceDataSource' {} Text
a -> S3ReferenceDataSource
s {$sel:bucketARN:S3ReferenceDataSource' :: Text
bucketARN = Text
a} :: S3ReferenceDataSource)
s3ReferenceDataSource_fileKey :: Lens.Lens' S3ReferenceDataSource Prelude.Text
s3ReferenceDataSource_fileKey :: (Text -> f Text)
-> S3ReferenceDataSource -> f S3ReferenceDataSource
s3ReferenceDataSource_fileKey = (S3ReferenceDataSource -> Text)
-> (S3ReferenceDataSource -> Text -> S3ReferenceDataSource)
-> Lens S3ReferenceDataSource S3ReferenceDataSource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ReferenceDataSource' {Text
fileKey :: Text
$sel:fileKey:S3ReferenceDataSource' :: S3ReferenceDataSource -> Text
fileKey} -> Text
fileKey) (\s :: S3ReferenceDataSource
s@S3ReferenceDataSource' {} Text
a -> S3ReferenceDataSource
s {$sel:fileKey:S3ReferenceDataSource' :: Text
fileKey = Text
a} :: S3ReferenceDataSource)
s3ReferenceDataSource_referenceRoleARN :: Lens.Lens' S3ReferenceDataSource Prelude.Text
s3ReferenceDataSource_referenceRoleARN :: (Text -> f Text)
-> S3ReferenceDataSource -> f S3ReferenceDataSource
s3ReferenceDataSource_referenceRoleARN = (S3ReferenceDataSource -> Text)
-> (S3ReferenceDataSource -> Text -> S3ReferenceDataSource)
-> Lens S3ReferenceDataSource S3ReferenceDataSource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ReferenceDataSource' {Text
referenceRoleARN :: Text
$sel:referenceRoleARN:S3ReferenceDataSource' :: S3ReferenceDataSource -> Text
referenceRoleARN} -> Text
referenceRoleARN) (\s :: S3ReferenceDataSource
s@S3ReferenceDataSource' {} Text
a -> S3ReferenceDataSource
s {$sel:referenceRoleARN:S3ReferenceDataSource' :: Text
referenceRoleARN = Text
a} :: S3ReferenceDataSource)
instance Prelude.Hashable S3ReferenceDataSource
instance Prelude.NFData S3ReferenceDataSource
instance Core.ToJSON S3ReferenceDataSource where
toJSON :: S3ReferenceDataSource -> Value
toJSON S3ReferenceDataSource' {Text
referenceRoleARN :: Text
fileKey :: Text
bucketARN :: Text
$sel:referenceRoleARN:S3ReferenceDataSource' :: S3ReferenceDataSource -> Text
$sel:fileKey:S3ReferenceDataSource' :: S3ReferenceDataSource -> Text
$sel:bucketARN:S3ReferenceDataSource' :: S3ReferenceDataSource -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"BucketARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
bucketARN),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FileKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fileKey),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ReferenceRoleARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
referenceRoleARN)
]
)