{-# 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.KinesisAnalyticsV2.Types.S3ReferenceDataSourceUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data S3ReferenceDataSourceUpdate = S3ReferenceDataSourceUpdate'
{
S3ReferenceDataSourceUpdate -> Maybe Text
bucketARNUpdate :: Prelude.Maybe Prelude.Text,
S3ReferenceDataSourceUpdate -> Maybe Text
fileKeyUpdate :: Prelude.Maybe Prelude.Text
}
deriving (S3ReferenceDataSourceUpdate -> S3ReferenceDataSourceUpdate -> Bool
(S3ReferenceDataSourceUpdate
-> S3ReferenceDataSourceUpdate -> Bool)
-> (S3ReferenceDataSourceUpdate
-> S3ReferenceDataSourceUpdate -> Bool)
-> Eq S3ReferenceDataSourceUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3ReferenceDataSourceUpdate -> S3ReferenceDataSourceUpdate -> Bool
$c/= :: S3ReferenceDataSourceUpdate -> S3ReferenceDataSourceUpdate -> Bool
== :: S3ReferenceDataSourceUpdate -> S3ReferenceDataSourceUpdate -> Bool
$c== :: S3ReferenceDataSourceUpdate -> S3ReferenceDataSourceUpdate -> Bool
Prelude.Eq, ReadPrec [S3ReferenceDataSourceUpdate]
ReadPrec S3ReferenceDataSourceUpdate
Int -> ReadS S3ReferenceDataSourceUpdate
ReadS [S3ReferenceDataSourceUpdate]
(Int -> ReadS S3ReferenceDataSourceUpdate)
-> ReadS [S3ReferenceDataSourceUpdate]
-> ReadPrec S3ReferenceDataSourceUpdate
-> ReadPrec [S3ReferenceDataSourceUpdate]
-> Read S3ReferenceDataSourceUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3ReferenceDataSourceUpdate]
$creadListPrec :: ReadPrec [S3ReferenceDataSourceUpdate]
readPrec :: ReadPrec S3ReferenceDataSourceUpdate
$creadPrec :: ReadPrec S3ReferenceDataSourceUpdate
readList :: ReadS [S3ReferenceDataSourceUpdate]
$creadList :: ReadS [S3ReferenceDataSourceUpdate]
readsPrec :: Int -> ReadS S3ReferenceDataSourceUpdate
$creadsPrec :: Int -> ReadS S3ReferenceDataSourceUpdate
Prelude.Read, Int -> S3ReferenceDataSourceUpdate -> ShowS
[S3ReferenceDataSourceUpdate] -> ShowS
S3ReferenceDataSourceUpdate -> String
(Int -> S3ReferenceDataSourceUpdate -> ShowS)
-> (S3ReferenceDataSourceUpdate -> String)
-> ([S3ReferenceDataSourceUpdate] -> ShowS)
-> Show S3ReferenceDataSourceUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3ReferenceDataSourceUpdate] -> ShowS
$cshowList :: [S3ReferenceDataSourceUpdate] -> ShowS
show :: S3ReferenceDataSourceUpdate -> String
$cshow :: S3ReferenceDataSourceUpdate -> String
showsPrec :: Int -> S3ReferenceDataSourceUpdate -> ShowS
$cshowsPrec :: Int -> S3ReferenceDataSourceUpdate -> ShowS
Prelude.Show, (forall x.
S3ReferenceDataSourceUpdate -> Rep S3ReferenceDataSourceUpdate x)
-> (forall x.
Rep S3ReferenceDataSourceUpdate x -> S3ReferenceDataSourceUpdate)
-> Generic S3ReferenceDataSourceUpdate
forall x.
Rep S3ReferenceDataSourceUpdate x -> S3ReferenceDataSourceUpdate
forall x.
S3ReferenceDataSourceUpdate -> Rep S3ReferenceDataSourceUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep S3ReferenceDataSourceUpdate x -> S3ReferenceDataSourceUpdate
$cfrom :: forall x.
S3ReferenceDataSourceUpdate -> Rep S3ReferenceDataSourceUpdate x
Prelude.Generic)
newS3ReferenceDataSourceUpdate ::
S3ReferenceDataSourceUpdate
newS3ReferenceDataSourceUpdate :: S3ReferenceDataSourceUpdate
newS3ReferenceDataSourceUpdate =
S3ReferenceDataSourceUpdate' :: Maybe Text -> Maybe Text -> S3ReferenceDataSourceUpdate
S3ReferenceDataSourceUpdate'
{ $sel:bucketARNUpdate:S3ReferenceDataSourceUpdate' :: Maybe Text
bucketARNUpdate =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fileKeyUpdate:S3ReferenceDataSourceUpdate' :: Maybe Text
fileKeyUpdate = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
s3ReferenceDataSourceUpdate_bucketARNUpdate :: Lens.Lens' S3ReferenceDataSourceUpdate (Prelude.Maybe Prelude.Text)
s3ReferenceDataSourceUpdate_bucketARNUpdate :: (Maybe Text -> f (Maybe Text))
-> S3ReferenceDataSourceUpdate -> f S3ReferenceDataSourceUpdate
s3ReferenceDataSourceUpdate_bucketARNUpdate = (S3ReferenceDataSourceUpdate -> Maybe Text)
-> (S3ReferenceDataSourceUpdate
-> Maybe Text -> S3ReferenceDataSourceUpdate)
-> Lens
S3ReferenceDataSourceUpdate
S3ReferenceDataSourceUpdate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ReferenceDataSourceUpdate' {Maybe Text
bucketARNUpdate :: Maybe Text
$sel:bucketARNUpdate:S3ReferenceDataSourceUpdate' :: S3ReferenceDataSourceUpdate -> Maybe Text
bucketARNUpdate} -> Maybe Text
bucketARNUpdate) (\s :: S3ReferenceDataSourceUpdate
s@S3ReferenceDataSourceUpdate' {} Maybe Text
a -> S3ReferenceDataSourceUpdate
s {$sel:bucketARNUpdate:S3ReferenceDataSourceUpdate' :: Maybe Text
bucketARNUpdate = Maybe Text
a} :: S3ReferenceDataSourceUpdate)
s3ReferenceDataSourceUpdate_fileKeyUpdate :: Lens.Lens' S3ReferenceDataSourceUpdate (Prelude.Maybe Prelude.Text)
s3ReferenceDataSourceUpdate_fileKeyUpdate :: (Maybe Text -> f (Maybe Text))
-> S3ReferenceDataSourceUpdate -> f S3ReferenceDataSourceUpdate
s3ReferenceDataSourceUpdate_fileKeyUpdate = (S3ReferenceDataSourceUpdate -> Maybe Text)
-> (S3ReferenceDataSourceUpdate
-> Maybe Text -> S3ReferenceDataSourceUpdate)
-> Lens
S3ReferenceDataSourceUpdate
S3ReferenceDataSourceUpdate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ReferenceDataSourceUpdate' {Maybe Text
fileKeyUpdate :: Maybe Text
$sel:fileKeyUpdate:S3ReferenceDataSourceUpdate' :: S3ReferenceDataSourceUpdate -> Maybe Text
fileKeyUpdate} -> Maybe Text
fileKeyUpdate) (\s :: S3ReferenceDataSourceUpdate
s@S3ReferenceDataSourceUpdate' {} Maybe Text
a -> S3ReferenceDataSourceUpdate
s {$sel:fileKeyUpdate:S3ReferenceDataSourceUpdate' :: Maybe Text
fileKeyUpdate = Maybe Text
a} :: S3ReferenceDataSourceUpdate)
instance Prelude.Hashable S3ReferenceDataSourceUpdate
instance Prelude.NFData S3ReferenceDataSourceUpdate
instance Core.ToJSON S3ReferenceDataSourceUpdate where
toJSON :: S3ReferenceDataSourceUpdate -> Value
toJSON S3ReferenceDataSourceUpdate' {Maybe Text
fileKeyUpdate :: Maybe Text
bucketARNUpdate :: Maybe Text
$sel:fileKeyUpdate:S3ReferenceDataSourceUpdate' :: S3ReferenceDataSourceUpdate -> Maybe Text
$sel:bucketARNUpdate:S3ReferenceDataSourceUpdate' :: S3ReferenceDataSourceUpdate -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"BucketARNUpdate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
bucketARNUpdate,
(Text
"FileKeyUpdate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
fileKeyUpdate
]
)