{-# 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.RobOMaker.Types.TemplateLocation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TemplateLocation = TemplateLocation'
{
TemplateLocation -> Text
s3Bucket :: Prelude.Text,
TemplateLocation -> Text
s3Key :: Prelude.Text
}
deriving (TemplateLocation -> TemplateLocation -> Bool
(TemplateLocation -> TemplateLocation -> Bool)
-> (TemplateLocation -> TemplateLocation -> Bool)
-> Eq TemplateLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TemplateLocation -> TemplateLocation -> Bool
$c/= :: TemplateLocation -> TemplateLocation -> Bool
== :: TemplateLocation -> TemplateLocation -> Bool
$c== :: TemplateLocation -> TemplateLocation -> Bool
Prelude.Eq, ReadPrec [TemplateLocation]
ReadPrec TemplateLocation
Int -> ReadS TemplateLocation
ReadS [TemplateLocation]
(Int -> ReadS TemplateLocation)
-> ReadS [TemplateLocation]
-> ReadPrec TemplateLocation
-> ReadPrec [TemplateLocation]
-> Read TemplateLocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TemplateLocation]
$creadListPrec :: ReadPrec [TemplateLocation]
readPrec :: ReadPrec TemplateLocation
$creadPrec :: ReadPrec TemplateLocation
readList :: ReadS [TemplateLocation]
$creadList :: ReadS [TemplateLocation]
readsPrec :: Int -> ReadS TemplateLocation
$creadsPrec :: Int -> ReadS TemplateLocation
Prelude.Read, Int -> TemplateLocation -> ShowS
[TemplateLocation] -> ShowS
TemplateLocation -> String
(Int -> TemplateLocation -> ShowS)
-> (TemplateLocation -> String)
-> ([TemplateLocation] -> ShowS)
-> Show TemplateLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateLocation] -> ShowS
$cshowList :: [TemplateLocation] -> ShowS
show :: TemplateLocation -> String
$cshow :: TemplateLocation -> String
showsPrec :: Int -> TemplateLocation -> ShowS
$cshowsPrec :: Int -> TemplateLocation -> ShowS
Prelude.Show, (forall x. TemplateLocation -> Rep TemplateLocation x)
-> (forall x. Rep TemplateLocation x -> TemplateLocation)
-> Generic TemplateLocation
forall x. Rep TemplateLocation x -> TemplateLocation
forall x. TemplateLocation -> Rep TemplateLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TemplateLocation x -> TemplateLocation
$cfrom :: forall x. TemplateLocation -> Rep TemplateLocation x
Prelude.Generic)
newTemplateLocation ::
Prelude.Text ->
Prelude.Text ->
TemplateLocation
newTemplateLocation :: Text -> Text -> TemplateLocation
newTemplateLocation Text
pS3Bucket_ Text
pS3Key_ =
TemplateLocation' :: Text -> Text -> TemplateLocation
TemplateLocation'
{ $sel:s3Bucket:TemplateLocation' :: Text
s3Bucket = Text
pS3Bucket_,
$sel:s3Key:TemplateLocation' :: Text
s3Key = Text
pS3Key_
}
templateLocation_s3Bucket :: Lens.Lens' TemplateLocation Prelude.Text
templateLocation_s3Bucket :: (Text -> f Text) -> TemplateLocation -> f TemplateLocation
templateLocation_s3Bucket = (TemplateLocation -> Text)
-> (TemplateLocation -> Text -> TemplateLocation)
-> Lens TemplateLocation TemplateLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateLocation' {Text
s3Bucket :: Text
$sel:s3Bucket:TemplateLocation' :: TemplateLocation -> Text
s3Bucket} -> Text
s3Bucket) (\s :: TemplateLocation
s@TemplateLocation' {} Text
a -> TemplateLocation
s {$sel:s3Bucket:TemplateLocation' :: Text
s3Bucket = Text
a} :: TemplateLocation)
templateLocation_s3Key :: Lens.Lens' TemplateLocation Prelude.Text
templateLocation_s3Key :: (Text -> f Text) -> TemplateLocation -> f TemplateLocation
templateLocation_s3Key = (TemplateLocation -> Text)
-> (TemplateLocation -> Text -> TemplateLocation)
-> Lens TemplateLocation TemplateLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateLocation' {Text
s3Key :: Text
$sel:s3Key:TemplateLocation' :: TemplateLocation -> Text
s3Key} -> Text
s3Key) (\s :: TemplateLocation
s@TemplateLocation' {} Text
a -> TemplateLocation
s {$sel:s3Key:TemplateLocation' :: Text
s3Key = Text
a} :: TemplateLocation)
instance Prelude.Hashable TemplateLocation
instance Prelude.NFData TemplateLocation
instance Core.ToJSON TemplateLocation where
toJSON :: TemplateLocation -> Value
toJSON TemplateLocation' {Text
s3Key :: Text
s3Bucket :: Text
$sel:s3Key:TemplateLocation' :: TemplateLocation -> Text
$sel:s3Bucket:TemplateLocation' :: TemplateLocation -> 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
"s3Bucket" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
s3Bucket),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"s3Key" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
s3Key)
]
)