{-# 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.S3ContentLocationUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data S3ContentLocationUpdate = S3ContentLocationUpdate'
{
S3ContentLocationUpdate -> Maybe Text
bucketARNUpdate :: Prelude.Maybe Prelude.Text,
S3ContentLocationUpdate -> Maybe Text
fileKeyUpdate :: Prelude.Maybe Prelude.Text,
S3ContentLocationUpdate -> Maybe Text
objectVersionUpdate :: Prelude.Maybe Prelude.Text
}
deriving (S3ContentLocationUpdate -> S3ContentLocationUpdate -> Bool
(S3ContentLocationUpdate -> S3ContentLocationUpdate -> Bool)
-> (S3ContentLocationUpdate -> S3ContentLocationUpdate -> Bool)
-> Eq S3ContentLocationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3ContentLocationUpdate -> S3ContentLocationUpdate -> Bool
$c/= :: S3ContentLocationUpdate -> S3ContentLocationUpdate -> Bool
== :: S3ContentLocationUpdate -> S3ContentLocationUpdate -> Bool
$c== :: S3ContentLocationUpdate -> S3ContentLocationUpdate -> Bool
Prelude.Eq, ReadPrec [S3ContentLocationUpdate]
ReadPrec S3ContentLocationUpdate
Int -> ReadS S3ContentLocationUpdate
ReadS [S3ContentLocationUpdate]
(Int -> ReadS S3ContentLocationUpdate)
-> ReadS [S3ContentLocationUpdate]
-> ReadPrec S3ContentLocationUpdate
-> ReadPrec [S3ContentLocationUpdate]
-> Read S3ContentLocationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3ContentLocationUpdate]
$creadListPrec :: ReadPrec [S3ContentLocationUpdate]
readPrec :: ReadPrec S3ContentLocationUpdate
$creadPrec :: ReadPrec S3ContentLocationUpdate
readList :: ReadS [S3ContentLocationUpdate]
$creadList :: ReadS [S3ContentLocationUpdate]
readsPrec :: Int -> ReadS S3ContentLocationUpdate
$creadsPrec :: Int -> ReadS S3ContentLocationUpdate
Prelude.Read, Int -> S3ContentLocationUpdate -> ShowS
[S3ContentLocationUpdate] -> ShowS
S3ContentLocationUpdate -> String
(Int -> S3ContentLocationUpdate -> ShowS)
-> (S3ContentLocationUpdate -> String)
-> ([S3ContentLocationUpdate] -> ShowS)
-> Show S3ContentLocationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3ContentLocationUpdate] -> ShowS
$cshowList :: [S3ContentLocationUpdate] -> ShowS
show :: S3ContentLocationUpdate -> String
$cshow :: S3ContentLocationUpdate -> String
showsPrec :: Int -> S3ContentLocationUpdate -> ShowS
$cshowsPrec :: Int -> S3ContentLocationUpdate -> ShowS
Prelude.Show, (forall x.
S3ContentLocationUpdate -> Rep S3ContentLocationUpdate x)
-> (forall x.
Rep S3ContentLocationUpdate x -> S3ContentLocationUpdate)
-> Generic S3ContentLocationUpdate
forall x. Rep S3ContentLocationUpdate x -> S3ContentLocationUpdate
forall x. S3ContentLocationUpdate -> Rep S3ContentLocationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3ContentLocationUpdate x -> S3ContentLocationUpdate
$cfrom :: forall x. S3ContentLocationUpdate -> Rep S3ContentLocationUpdate x
Prelude.Generic)
newS3ContentLocationUpdate ::
S3ContentLocationUpdate
newS3ContentLocationUpdate :: S3ContentLocationUpdate
newS3ContentLocationUpdate =
S3ContentLocationUpdate' :: Maybe Text -> Maybe Text -> Maybe Text -> S3ContentLocationUpdate
S3ContentLocationUpdate'
{ $sel:bucketARNUpdate:S3ContentLocationUpdate' :: Maybe Text
bucketARNUpdate =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fileKeyUpdate:S3ContentLocationUpdate' :: Maybe Text
fileKeyUpdate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:objectVersionUpdate:S3ContentLocationUpdate' :: Maybe Text
objectVersionUpdate = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
s3ContentLocationUpdate_bucketARNUpdate :: Lens.Lens' S3ContentLocationUpdate (Prelude.Maybe Prelude.Text)
s3ContentLocationUpdate_bucketARNUpdate :: (Maybe Text -> f (Maybe Text))
-> S3ContentLocationUpdate -> f S3ContentLocationUpdate
s3ContentLocationUpdate_bucketARNUpdate = (S3ContentLocationUpdate -> Maybe Text)
-> (S3ContentLocationUpdate
-> Maybe Text -> S3ContentLocationUpdate)
-> Lens
S3ContentLocationUpdate
S3ContentLocationUpdate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ContentLocationUpdate' {Maybe Text
bucketARNUpdate :: Maybe Text
$sel:bucketARNUpdate:S3ContentLocationUpdate' :: S3ContentLocationUpdate -> Maybe Text
bucketARNUpdate} -> Maybe Text
bucketARNUpdate) (\s :: S3ContentLocationUpdate
s@S3ContentLocationUpdate' {} Maybe Text
a -> S3ContentLocationUpdate
s {$sel:bucketARNUpdate:S3ContentLocationUpdate' :: Maybe Text
bucketARNUpdate = Maybe Text
a} :: S3ContentLocationUpdate)
s3ContentLocationUpdate_fileKeyUpdate :: Lens.Lens' S3ContentLocationUpdate (Prelude.Maybe Prelude.Text)
s3ContentLocationUpdate_fileKeyUpdate :: (Maybe Text -> f (Maybe Text))
-> S3ContentLocationUpdate -> f S3ContentLocationUpdate
s3ContentLocationUpdate_fileKeyUpdate = (S3ContentLocationUpdate -> Maybe Text)
-> (S3ContentLocationUpdate
-> Maybe Text -> S3ContentLocationUpdate)
-> Lens
S3ContentLocationUpdate
S3ContentLocationUpdate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ContentLocationUpdate' {Maybe Text
fileKeyUpdate :: Maybe Text
$sel:fileKeyUpdate:S3ContentLocationUpdate' :: S3ContentLocationUpdate -> Maybe Text
fileKeyUpdate} -> Maybe Text
fileKeyUpdate) (\s :: S3ContentLocationUpdate
s@S3ContentLocationUpdate' {} Maybe Text
a -> S3ContentLocationUpdate
s {$sel:fileKeyUpdate:S3ContentLocationUpdate' :: Maybe Text
fileKeyUpdate = Maybe Text
a} :: S3ContentLocationUpdate)
s3ContentLocationUpdate_objectVersionUpdate :: Lens.Lens' S3ContentLocationUpdate (Prelude.Maybe Prelude.Text)
s3ContentLocationUpdate_objectVersionUpdate :: (Maybe Text -> f (Maybe Text))
-> S3ContentLocationUpdate -> f S3ContentLocationUpdate
s3ContentLocationUpdate_objectVersionUpdate = (S3ContentLocationUpdate -> Maybe Text)
-> (S3ContentLocationUpdate
-> Maybe Text -> S3ContentLocationUpdate)
-> Lens
S3ContentLocationUpdate
S3ContentLocationUpdate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ContentLocationUpdate' {Maybe Text
objectVersionUpdate :: Maybe Text
$sel:objectVersionUpdate:S3ContentLocationUpdate' :: S3ContentLocationUpdate -> Maybe Text
objectVersionUpdate} -> Maybe Text
objectVersionUpdate) (\s :: S3ContentLocationUpdate
s@S3ContentLocationUpdate' {} Maybe Text
a -> S3ContentLocationUpdate
s {$sel:objectVersionUpdate:S3ContentLocationUpdate' :: Maybe Text
objectVersionUpdate = Maybe Text
a} :: S3ContentLocationUpdate)
instance Prelude.Hashable S3ContentLocationUpdate
instance Prelude.NFData S3ContentLocationUpdate
instance Core.ToJSON S3ContentLocationUpdate where
toJSON :: S3ContentLocationUpdate -> Value
toJSON S3ContentLocationUpdate' {Maybe Text
objectVersionUpdate :: Maybe Text
fileKeyUpdate :: Maybe Text
bucketARNUpdate :: Maybe Text
$sel:objectVersionUpdate:S3ContentLocationUpdate' :: S3ContentLocationUpdate -> Maybe Text
$sel:fileKeyUpdate:S3ContentLocationUpdate' :: S3ContentLocationUpdate -> Maybe Text
$sel:bucketARNUpdate:S3ContentLocationUpdate' :: S3ContentLocationUpdate -> 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,
(Text
"ObjectVersionUpdate" 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
objectVersionUpdate
]
)