{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data FunctionCodeLocation = FunctionCodeLocation'
{
FunctionCodeLocation -> Maybe Text
imageUri :: Prelude.Maybe Prelude.Text,
FunctionCodeLocation -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
FunctionCodeLocation -> Maybe Text
repositoryType :: Prelude.Maybe Prelude.Text,
FunctionCodeLocation -> Maybe Text
resolvedImageUri :: Prelude.Maybe Prelude.Text
}
deriving (FunctionCodeLocation -> FunctionCodeLocation -> Bool
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]
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
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. 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'
{ $sel:imageUri:FunctionCodeLocation' :: Maybe Text
imageUri = forall a. Maybe a
Prelude.Nothing,
$sel:location:FunctionCodeLocation' :: Maybe Text
location = forall a. Maybe a
Prelude.Nothing,
$sel:repositoryType:FunctionCodeLocation' :: Maybe Text
repositoryType = forall a. Maybe a
Prelude.Nothing,
$sel:resolvedImageUri:FunctionCodeLocation' :: Maybe Text
resolvedImageUri = forall a. Maybe a
Prelude.Nothing
}
functionCodeLocation_imageUri :: Lens.Lens' FunctionCodeLocation (Prelude.Maybe Prelude.Text)
functionCodeLocation_imageUri :: Lens' FunctionCodeLocation (Maybe Text)
functionCodeLocation_imageUri = 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_location :: Lens.Lens' FunctionCodeLocation (Prelude.Maybe Prelude.Text)
functionCodeLocation_location :: Lens' FunctionCodeLocation (Maybe Text)
functionCodeLocation_location = 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_repositoryType :: Lens.Lens' FunctionCodeLocation (Prelude.Maybe Prelude.Text)
functionCodeLocation_repositoryType :: Lens' FunctionCodeLocation (Maybe Text)
functionCodeLocation_repositoryType = 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)
functionCodeLocation_resolvedImageUri :: Lens.Lens' FunctionCodeLocation (Prelude.Maybe Prelude.Text)
functionCodeLocation_resolvedImageUri :: Lens' FunctionCodeLocation (Maybe Text)
functionCodeLocation_resolvedImageUri = 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)
instance Data.FromJSON FunctionCodeLocation where
parseJSON :: Value -> Parser FunctionCodeLocation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FunctionCodeLocation"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> FunctionCodeLocation
FunctionCodeLocation'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ImageUri")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Location")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RepositoryType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ResolvedImageUri")
)
instance Prelude.Hashable FunctionCodeLocation where
hashWithSalt :: Int -> FunctionCodeLocation -> Int
hashWithSalt Int
_salt FunctionCodeLocation' {Maybe Text
resolvedImageUri :: Maybe Text
repositoryType :: Maybe Text
location :: Maybe Text
imageUri :: Maybe Text
$sel:resolvedImageUri:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
$sel:repositoryType:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
$sel:location:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
$sel:imageUri:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageUri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
location
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
repositoryType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resolvedImageUri
instance Prelude.NFData FunctionCodeLocation where
rnf :: FunctionCodeLocation -> ()
rnf FunctionCodeLocation' {Maybe Text
resolvedImageUri :: Maybe Text
repositoryType :: Maybe Text
location :: Maybe Text
imageUri :: Maybe Text
$sel:resolvedImageUri:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
$sel:repositoryType:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
$sel:location:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
$sel:imageUri:FunctionCodeLocation' :: FunctionCodeLocation -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageUri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
location
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
repositoryType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resolvedImageUri