{-# 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.S3ApplicationCodeLocationDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data S3ApplicationCodeLocationDescription = S3ApplicationCodeLocationDescription'
{
S3ApplicationCodeLocationDescription -> Maybe Text
objectVersion :: Prelude.Maybe Prelude.Text,
S3ApplicationCodeLocationDescription -> Text
bucketARN :: Prelude.Text,
S3ApplicationCodeLocationDescription -> Text
fileKey :: Prelude.Text
}
deriving (S3ApplicationCodeLocationDescription
-> S3ApplicationCodeLocationDescription -> Bool
(S3ApplicationCodeLocationDescription
-> S3ApplicationCodeLocationDescription -> Bool)
-> (S3ApplicationCodeLocationDescription
-> S3ApplicationCodeLocationDescription -> Bool)
-> Eq S3ApplicationCodeLocationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3ApplicationCodeLocationDescription
-> S3ApplicationCodeLocationDescription -> Bool
$c/= :: S3ApplicationCodeLocationDescription
-> S3ApplicationCodeLocationDescription -> Bool
== :: S3ApplicationCodeLocationDescription
-> S3ApplicationCodeLocationDescription -> Bool
$c== :: S3ApplicationCodeLocationDescription
-> S3ApplicationCodeLocationDescription -> Bool
Prelude.Eq, ReadPrec [S3ApplicationCodeLocationDescription]
ReadPrec S3ApplicationCodeLocationDescription
Int -> ReadS S3ApplicationCodeLocationDescription
ReadS [S3ApplicationCodeLocationDescription]
(Int -> ReadS S3ApplicationCodeLocationDescription)
-> ReadS [S3ApplicationCodeLocationDescription]
-> ReadPrec S3ApplicationCodeLocationDescription
-> ReadPrec [S3ApplicationCodeLocationDescription]
-> Read S3ApplicationCodeLocationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3ApplicationCodeLocationDescription]
$creadListPrec :: ReadPrec [S3ApplicationCodeLocationDescription]
readPrec :: ReadPrec S3ApplicationCodeLocationDescription
$creadPrec :: ReadPrec S3ApplicationCodeLocationDescription
readList :: ReadS [S3ApplicationCodeLocationDescription]
$creadList :: ReadS [S3ApplicationCodeLocationDescription]
readsPrec :: Int -> ReadS S3ApplicationCodeLocationDescription
$creadsPrec :: Int -> ReadS S3ApplicationCodeLocationDescription
Prelude.Read, Int -> S3ApplicationCodeLocationDescription -> ShowS
[S3ApplicationCodeLocationDescription] -> ShowS
S3ApplicationCodeLocationDescription -> String
(Int -> S3ApplicationCodeLocationDescription -> ShowS)
-> (S3ApplicationCodeLocationDescription -> String)
-> ([S3ApplicationCodeLocationDescription] -> ShowS)
-> Show S3ApplicationCodeLocationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3ApplicationCodeLocationDescription] -> ShowS
$cshowList :: [S3ApplicationCodeLocationDescription] -> ShowS
show :: S3ApplicationCodeLocationDescription -> String
$cshow :: S3ApplicationCodeLocationDescription -> String
showsPrec :: Int -> S3ApplicationCodeLocationDescription -> ShowS
$cshowsPrec :: Int -> S3ApplicationCodeLocationDescription -> ShowS
Prelude.Show, (forall x.
S3ApplicationCodeLocationDescription
-> Rep S3ApplicationCodeLocationDescription x)
-> (forall x.
Rep S3ApplicationCodeLocationDescription x
-> S3ApplicationCodeLocationDescription)
-> Generic S3ApplicationCodeLocationDescription
forall x.
Rep S3ApplicationCodeLocationDescription x
-> S3ApplicationCodeLocationDescription
forall x.
S3ApplicationCodeLocationDescription
-> Rep S3ApplicationCodeLocationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep S3ApplicationCodeLocationDescription x
-> S3ApplicationCodeLocationDescription
$cfrom :: forall x.
S3ApplicationCodeLocationDescription
-> Rep S3ApplicationCodeLocationDescription x
Prelude.Generic)
newS3ApplicationCodeLocationDescription ::
Prelude.Text ->
Prelude.Text ->
S3ApplicationCodeLocationDescription
newS3ApplicationCodeLocationDescription :: Text -> Text -> S3ApplicationCodeLocationDescription
newS3ApplicationCodeLocationDescription
Text
pBucketARN_
Text
pFileKey_ =
S3ApplicationCodeLocationDescription' :: Maybe Text -> Text -> Text -> S3ApplicationCodeLocationDescription
S3ApplicationCodeLocationDescription'
{ $sel:objectVersion:S3ApplicationCodeLocationDescription' :: Maybe Text
objectVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bucketARN:S3ApplicationCodeLocationDescription' :: Text
bucketARN = Text
pBucketARN_,
$sel:fileKey:S3ApplicationCodeLocationDescription' :: Text
fileKey = Text
pFileKey_
}
s3ApplicationCodeLocationDescription_objectVersion :: Lens.Lens' S3ApplicationCodeLocationDescription (Prelude.Maybe Prelude.Text)
s3ApplicationCodeLocationDescription_objectVersion :: (Maybe Text -> f (Maybe Text))
-> S3ApplicationCodeLocationDescription
-> f S3ApplicationCodeLocationDescription
s3ApplicationCodeLocationDescription_objectVersion = (S3ApplicationCodeLocationDescription -> Maybe Text)
-> (S3ApplicationCodeLocationDescription
-> Maybe Text -> S3ApplicationCodeLocationDescription)
-> Lens
S3ApplicationCodeLocationDescription
S3ApplicationCodeLocationDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ApplicationCodeLocationDescription' {Maybe Text
objectVersion :: Maybe Text
$sel:objectVersion:S3ApplicationCodeLocationDescription' :: S3ApplicationCodeLocationDescription -> Maybe Text
objectVersion} -> Maybe Text
objectVersion) (\s :: S3ApplicationCodeLocationDescription
s@S3ApplicationCodeLocationDescription' {} Maybe Text
a -> S3ApplicationCodeLocationDescription
s {$sel:objectVersion:S3ApplicationCodeLocationDescription' :: Maybe Text
objectVersion = Maybe Text
a} :: S3ApplicationCodeLocationDescription)
s3ApplicationCodeLocationDescription_bucketARN :: Lens.Lens' S3ApplicationCodeLocationDescription Prelude.Text
s3ApplicationCodeLocationDescription_bucketARN :: (Text -> f Text)
-> S3ApplicationCodeLocationDescription
-> f S3ApplicationCodeLocationDescription
s3ApplicationCodeLocationDescription_bucketARN = (S3ApplicationCodeLocationDescription -> Text)
-> (S3ApplicationCodeLocationDescription
-> Text -> S3ApplicationCodeLocationDescription)
-> Lens
S3ApplicationCodeLocationDescription
S3ApplicationCodeLocationDescription
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ApplicationCodeLocationDescription' {Text
bucketARN :: Text
$sel:bucketARN:S3ApplicationCodeLocationDescription' :: S3ApplicationCodeLocationDescription -> Text
bucketARN} -> Text
bucketARN) (\s :: S3ApplicationCodeLocationDescription
s@S3ApplicationCodeLocationDescription' {} Text
a -> S3ApplicationCodeLocationDescription
s {$sel:bucketARN:S3ApplicationCodeLocationDescription' :: Text
bucketARN = Text
a} :: S3ApplicationCodeLocationDescription)
s3ApplicationCodeLocationDescription_fileKey :: Lens.Lens' S3ApplicationCodeLocationDescription Prelude.Text
s3ApplicationCodeLocationDescription_fileKey :: (Text -> f Text)
-> S3ApplicationCodeLocationDescription
-> f S3ApplicationCodeLocationDescription
s3ApplicationCodeLocationDescription_fileKey = (S3ApplicationCodeLocationDescription -> Text)
-> (S3ApplicationCodeLocationDescription
-> Text -> S3ApplicationCodeLocationDescription)
-> Lens
S3ApplicationCodeLocationDescription
S3ApplicationCodeLocationDescription
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ApplicationCodeLocationDescription' {Text
fileKey :: Text
$sel:fileKey:S3ApplicationCodeLocationDescription' :: S3ApplicationCodeLocationDescription -> Text
fileKey} -> Text
fileKey) (\s :: S3ApplicationCodeLocationDescription
s@S3ApplicationCodeLocationDescription' {} Text
a -> S3ApplicationCodeLocationDescription
s {$sel:fileKey:S3ApplicationCodeLocationDescription' :: Text
fileKey = Text
a} :: S3ApplicationCodeLocationDescription)
instance
Core.FromJSON
S3ApplicationCodeLocationDescription
where
parseJSON :: Value -> Parser S3ApplicationCodeLocationDescription
parseJSON =
String
-> (Object -> Parser S3ApplicationCodeLocationDescription)
-> Value
-> Parser S3ApplicationCodeLocationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"S3ApplicationCodeLocationDescription"
( \Object
x ->
Maybe Text -> Text -> Text -> S3ApplicationCodeLocationDescription
S3ApplicationCodeLocationDescription'
(Maybe Text
-> Text -> Text -> S3ApplicationCodeLocationDescription)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> S3ApplicationCodeLocationDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ObjectVersion")
Parser (Text -> Text -> S3ApplicationCodeLocationDescription)
-> Parser Text
-> Parser (Text -> S3ApplicationCodeLocationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"BucketARN")
Parser (Text -> S3ApplicationCodeLocationDescription)
-> Parser Text -> Parser S3ApplicationCodeLocationDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"FileKey")
)
instance
Prelude.Hashable
S3ApplicationCodeLocationDescription
instance
Prelude.NFData
S3ApplicationCodeLocationDescription