{-# 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.Lambda.Types.FunctionCodeLocation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FunctionCodeLocation = FunctionCodeLocation'
{
FunctionCodeLocation -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
FunctionCodeLocation -> Maybe Text
resolvedImageUri :: Prelude.Maybe Prelude.Text,
FunctionCodeLocation -> Maybe Text
imageUri :: Prelude.Maybe Prelude.Text,
FunctionCodeLocation -> Maybe Text
repositoryType :: Prelude.Maybe Prelude.Text
}
deriving (FunctionCodeLocation -> FunctionCodeLocation -> Bool
(FunctionCodeLocation -> FunctionCodeLocation -> Bool)
-> (FunctionCodeLocation -> FunctionCodeLocation -> Bool)
-> Eq FunctionCodeLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionCodeLocation -> FunctionCodeLocation -> Bool
$c/= :: FunctionCodeLocation -> FunctionCodeLocation -> Bool
== :: FunctionCodeLocation -> FunctionCodeLocation -> Bool
$c== :: FunctionCodeLocation -> FunctionCodeLocation -> Bool
Prelude.Eq, ReadPrec [FunctionCodeLocation]
ReadPrec FunctionCodeLocation
Int -> ReadS FunctionCodeLocation
ReadS [FunctionCodeLocation]
(Int -> ReadS FunctionCodeLocation)
-> ReadS [FunctionCodeLocation]
-> ReadPrec FunctionCodeLocation
-> ReadPrec [FunctionCodeLocation]
-> Read FunctionCodeLocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FunctionCodeLocation]
$creadListPrec :: ReadPrec [FunctionCodeLocation]
readPrec :: ReadPrec FunctionCodeLocation
$creadPrec :: ReadPrec FunctionCodeLocation
readList :: ReadS [FunctionCodeLocation]
$creadList :: ReadS [FunctionCodeLocation]
readsPrec :: Int -> ReadS FunctionCodeLocation
$creadsPrec :: Int -> ReadS FunctionCodeLocation
Prelude.Read, Int -> FunctionCodeLocation -> ShowS
[FunctionCodeLocation] -> ShowS
FunctionCodeLocation -> String
(Int -> FunctionCodeLocation -> ShowS)
-> (FunctionCodeLocation -> String)
-> ([FunctionCodeLocation] -> ShowS)
-> Show FunctionCodeLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FunctionCodeLocation] -> ShowS
$cshowList :: [FunctionCodeLocation] -> ShowS
show :: FunctionCodeLocation -> String
$cshow :: FunctionCodeLocation -> String
showsPrec :: Int -> FunctionCodeLocation -> ShowS
$cshowsPrec :: Int -> FunctionCodeLocation -> ShowS
Prelude.Show, (forall x. FunctionCodeLocation -> Rep FunctionCodeLocation x)
-> (forall x. Rep FunctionCodeLocation x -> FunctionCodeLocation)
-> Generic FunctionCodeLocation
forall x. Rep FunctionCodeLocation x -> FunctionCodeLocation
forall x. FunctionCodeLocation -> Rep FunctionCodeLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FunctionCodeLocation x -> FunctionCodeLocation
$cfrom :: forall x. FunctionCodeLocation -> Rep FunctionCodeLocation x
Prelude.Generic)
newFunctionCodeLocation ::
FunctionCodeLocation
newFunctionCodeLocation :: FunctionCodeLocation
newFunctionCodeLocation =
FunctionCodeLocation' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> FunctionCodeLocation
FunctionCodeLocation'
{ $sel:location:FunctionCodeLocation' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resolvedImageUri:FunctionCodeLocation' :: Maybe Text
resolvedImageUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageUri:FunctionCodeLocation' :: Maybe Text
imageUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryType:FunctionCodeLocation' :: Maybe Text
repositoryType = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
functionCodeLocation_location :: Lens.Lens' FunctionCodeLocation (Prelude.Maybe Prelude.Text)
functionCodeLocation_location :: (Maybe Text -> f (Maybe Text))
-> FunctionCodeLocation -> f FunctionCodeLocation
functionCodeLocation_location = (FunctionCodeLocation -> Maybe Text)
-> (FunctionCodeLocation -> Maybe Text -> FunctionCodeLocation)
-> Lens
FunctionCodeLocation FunctionCodeLocation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionCodeLocation' {Maybe Text
location :: Maybe Text
$sel:location:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
location} -> Maybe Text
location) (\s :: FunctionCodeLocation
s@FunctionCodeLocation' {} Maybe Text
a -> FunctionCodeLocation
s {$sel:location:FunctionCodeLocation' :: Maybe Text
location = Maybe Text
a} :: FunctionCodeLocation)
functionCodeLocation_resolvedImageUri :: Lens.Lens' FunctionCodeLocation (Prelude.Maybe Prelude.Text)
functionCodeLocation_resolvedImageUri :: (Maybe Text -> f (Maybe Text))
-> FunctionCodeLocation -> f FunctionCodeLocation
functionCodeLocation_resolvedImageUri = (FunctionCodeLocation -> Maybe Text)
-> (FunctionCodeLocation -> Maybe Text -> FunctionCodeLocation)
-> Lens
FunctionCodeLocation FunctionCodeLocation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionCodeLocation' {Maybe Text
resolvedImageUri :: Maybe Text
$sel:resolvedImageUri:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
resolvedImageUri} -> Maybe Text
resolvedImageUri) (\s :: FunctionCodeLocation
s@FunctionCodeLocation' {} Maybe Text
a -> FunctionCodeLocation
s {$sel:resolvedImageUri:FunctionCodeLocation' :: Maybe Text
resolvedImageUri = Maybe Text
a} :: FunctionCodeLocation)
functionCodeLocation_imageUri :: Lens.Lens' FunctionCodeLocation (Prelude.Maybe Prelude.Text)
functionCodeLocation_imageUri :: (Maybe Text -> f (Maybe Text))
-> FunctionCodeLocation -> f FunctionCodeLocation
functionCodeLocation_imageUri = (FunctionCodeLocation -> Maybe Text)
-> (FunctionCodeLocation -> Maybe Text -> FunctionCodeLocation)
-> Lens
FunctionCodeLocation FunctionCodeLocation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionCodeLocation' {Maybe Text
imageUri :: Maybe Text
$sel:imageUri:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
imageUri} -> Maybe Text
imageUri) (\s :: FunctionCodeLocation
s@FunctionCodeLocation' {} Maybe Text
a -> FunctionCodeLocation
s {$sel:imageUri:FunctionCodeLocation' :: Maybe Text
imageUri = Maybe Text
a} :: FunctionCodeLocation)
functionCodeLocation_repositoryType :: Lens.Lens' FunctionCodeLocation (Prelude.Maybe Prelude.Text)
functionCodeLocation_repositoryType :: (Maybe Text -> f (Maybe Text))
-> FunctionCodeLocation -> f FunctionCodeLocation
functionCodeLocation_repositoryType = (FunctionCodeLocation -> Maybe Text)
-> (FunctionCodeLocation -> Maybe Text -> FunctionCodeLocation)
-> Lens
FunctionCodeLocation FunctionCodeLocation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionCodeLocation' {Maybe Text
repositoryType :: Maybe Text
$sel:repositoryType:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
repositoryType} -> Maybe Text
repositoryType) (\s :: FunctionCodeLocation
s@FunctionCodeLocation' {} Maybe Text
a -> FunctionCodeLocation
s {$sel:repositoryType:FunctionCodeLocation' :: Maybe Text
repositoryType = Maybe Text
a} :: FunctionCodeLocation)
instance Core.FromJSON FunctionCodeLocation where
parseJSON :: Value -> Parser FunctionCodeLocation
parseJSON =
String
-> (Object -> Parser FunctionCodeLocation)
-> Value
-> Parser FunctionCodeLocation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FunctionCodeLocation"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> FunctionCodeLocation
FunctionCodeLocation'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> FunctionCodeLocation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> FunctionCodeLocation)
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
"Location")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> FunctionCodeLocation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> FunctionCodeLocation)
forall (f :: * -> *) a b. Applicative f => 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
"ResolvedImageUri")
Parser (Maybe Text -> Maybe Text -> FunctionCodeLocation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> FunctionCodeLocation)
forall (f :: * -> *) a b. Applicative f => 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
"ImageUri")
Parser (Maybe Text -> FunctionCodeLocation)
-> Parser (Maybe Text) -> Parser FunctionCodeLocation
forall (f :: * -> *) a b. Applicative f => 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
"RepositoryType")
)
instance Prelude.Hashable FunctionCodeLocation
instance Prelude.NFData FunctionCodeLocation