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