{-# 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.CodePipeline.Types.S3ArtifactLocation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data S3ArtifactLocation = S3ArtifactLocation'
{
S3ArtifactLocation -> Text
bucketName :: Prelude.Text,
S3ArtifactLocation -> Text
objectKey :: Prelude.Text
}
deriving (S3ArtifactLocation -> S3ArtifactLocation -> Bool
(S3ArtifactLocation -> S3ArtifactLocation -> Bool)
-> (S3ArtifactLocation -> S3ArtifactLocation -> Bool)
-> Eq S3ArtifactLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3ArtifactLocation -> S3ArtifactLocation -> Bool
$c/= :: S3ArtifactLocation -> S3ArtifactLocation -> Bool
== :: S3ArtifactLocation -> S3ArtifactLocation -> Bool
$c== :: S3ArtifactLocation -> S3ArtifactLocation -> Bool
Prelude.Eq, ReadPrec [S3ArtifactLocation]
ReadPrec S3ArtifactLocation
Int -> ReadS S3ArtifactLocation
ReadS [S3ArtifactLocation]
(Int -> ReadS S3ArtifactLocation)
-> ReadS [S3ArtifactLocation]
-> ReadPrec S3ArtifactLocation
-> ReadPrec [S3ArtifactLocation]
-> Read S3ArtifactLocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3ArtifactLocation]
$creadListPrec :: ReadPrec [S3ArtifactLocation]
readPrec :: ReadPrec S3ArtifactLocation
$creadPrec :: ReadPrec S3ArtifactLocation
readList :: ReadS [S3ArtifactLocation]
$creadList :: ReadS [S3ArtifactLocation]
readsPrec :: Int -> ReadS S3ArtifactLocation
$creadsPrec :: Int -> ReadS S3ArtifactLocation
Prelude.Read, Int -> S3ArtifactLocation -> ShowS
[S3ArtifactLocation] -> ShowS
S3ArtifactLocation -> String
(Int -> S3ArtifactLocation -> ShowS)
-> (S3ArtifactLocation -> String)
-> ([S3ArtifactLocation] -> ShowS)
-> Show S3ArtifactLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3ArtifactLocation] -> ShowS
$cshowList :: [S3ArtifactLocation] -> ShowS
show :: S3ArtifactLocation -> String
$cshow :: S3ArtifactLocation -> String
showsPrec :: Int -> S3ArtifactLocation -> ShowS
$cshowsPrec :: Int -> S3ArtifactLocation -> ShowS
Prelude.Show, (forall x. S3ArtifactLocation -> Rep S3ArtifactLocation x)
-> (forall x. Rep S3ArtifactLocation x -> S3ArtifactLocation)
-> Generic S3ArtifactLocation
forall x. Rep S3ArtifactLocation x -> S3ArtifactLocation
forall x. S3ArtifactLocation -> Rep S3ArtifactLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3ArtifactLocation x -> S3ArtifactLocation
$cfrom :: forall x. S3ArtifactLocation -> Rep S3ArtifactLocation x
Prelude.Generic)
newS3ArtifactLocation ::
Prelude.Text ->
Prelude.Text ->
S3ArtifactLocation
newS3ArtifactLocation :: Text -> Text -> S3ArtifactLocation
newS3ArtifactLocation Text
pBucketName_ Text
pObjectKey_ =
S3ArtifactLocation' :: Text -> Text -> S3ArtifactLocation
S3ArtifactLocation'
{ $sel:bucketName:S3ArtifactLocation' :: Text
bucketName = Text
pBucketName_,
$sel:objectKey:S3ArtifactLocation' :: Text
objectKey = Text
pObjectKey_
}
s3ArtifactLocation_bucketName :: Lens.Lens' S3ArtifactLocation Prelude.Text
s3ArtifactLocation_bucketName :: (Text -> f Text) -> S3ArtifactLocation -> f S3ArtifactLocation
s3ArtifactLocation_bucketName = (S3ArtifactLocation -> Text)
-> (S3ArtifactLocation -> Text -> S3ArtifactLocation)
-> Lens S3ArtifactLocation S3ArtifactLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ArtifactLocation' {Text
bucketName :: Text
$sel:bucketName:S3ArtifactLocation' :: S3ArtifactLocation -> Text
bucketName} -> Text
bucketName) (\s :: S3ArtifactLocation
s@S3ArtifactLocation' {} Text
a -> S3ArtifactLocation
s {$sel:bucketName:S3ArtifactLocation' :: Text
bucketName = Text
a} :: S3ArtifactLocation)
s3ArtifactLocation_objectKey :: Lens.Lens' S3ArtifactLocation Prelude.Text
s3ArtifactLocation_objectKey :: (Text -> f Text) -> S3ArtifactLocation -> f S3ArtifactLocation
s3ArtifactLocation_objectKey = (S3ArtifactLocation -> Text)
-> (S3ArtifactLocation -> Text -> S3ArtifactLocation)
-> Lens S3ArtifactLocation S3ArtifactLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ArtifactLocation' {Text
objectKey :: Text
$sel:objectKey:S3ArtifactLocation' :: S3ArtifactLocation -> Text
objectKey} -> Text
objectKey) (\s :: S3ArtifactLocation
s@S3ArtifactLocation' {} Text
a -> S3ArtifactLocation
s {$sel:objectKey:S3ArtifactLocation' :: Text
objectKey = Text
a} :: S3ArtifactLocation)
instance Core.FromJSON S3ArtifactLocation where
parseJSON :: Value -> Parser S3ArtifactLocation
parseJSON =
String
-> (Object -> Parser S3ArtifactLocation)
-> Value
-> Parser S3ArtifactLocation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"S3ArtifactLocation"
( \Object
x ->
Text -> Text -> S3ArtifactLocation
S3ArtifactLocation'
(Text -> Text -> S3ArtifactLocation)
-> Parser Text -> Parser (Text -> S3ArtifactLocation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"bucketName")
Parser (Text -> S3ArtifactLocation)
-> Parser Text -> Parser S3ArtifactLocation
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
"objectKey")
)
instance Prelude.Hashable S3ArtifactLocation
instance Prelude.NFData S3ArtifactLocation