{-# 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.CodeSigningConfig where
import qualified Amazonka.Core as Core
import Amazonka.Lambda.Types.AllowedPublishers
import Amazonka.Lambda.Types.CodeSigningPolicies
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CodeSigningConfig = CodeSigningConfig'
{
CodeSigningConfig -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CodeSigningConfig -> Text
codeSigningConfigId :: Prelude.Text,
CodeSigningConfig -> Text
codeSigningConfigArn :: Prelude.Text,
CodeSigningConfig -> AllowedPublishers
allowedPublishers :: AllowedPublishers,
CodeSigningConfig -> CodeSigningPolicies
codeSigningPolicies :: CodeSigningPolicies,
CodeSigningConfig -> Text
lastModified :: Prelude.Text
}
deriving (CodeSigningConfig -> CodeSigningConfig -> Bool
(CodeSigningConfig -> CodeSigningConfig -> Bool)
-> (CodeSigningConfig -> CodeSigningConfig -> Bool)
-> Eq CodeSigningConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeSigningConfig -> CodeSigningConfig -> Bool
$c/= :: CodeSigningConfig -> CodeSigningConfig -> Bool
== :: CodeSigningConfig -> CodeSigningConfig -> Bool
$c== :: CodeSigningConfig -> CodeSigningConfig -> Bool
Prelude.Eq, ReadPrec [CodeSigningConfig]
ReadPrec CodeSigningConfig
Int -> ReadS CodeSigningConfig
ReadS [CodeSigningConfig]
(Int -> ReadS CodeSigningConfig)
-> ReadS [CodeSigningConfig]
-> ReadPrec CodeSigningConfig
-> ReadPrec [CodeSigningConfig]
-> Read CodeSigningConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeSigningConfig]
$creadListPrec :: ReadPrec [CodeSigningConfig]
readPrec :: ReadPrec CodeSigningConfig
$creadPrec :: ReadPrec CodeSigningConfig
readList :: ReadS [CodeSigningConfig]
$creadList :: ReadS [CodeSigningConfig]
readsPrec :: Int -> ReadS CodeSigningConfig
$creadsPrec :: Int -> ReadS CodeSigningConfig
Prelude.Read, Int -> CodeSigningConfig -> ShowS
[CodeSigningConfig] -> ShowS
CodeSigningConfig -> String
(Int -> CodeSigningConfig -> ShowS)
-> (CodeSigningConfig -> String)
-> ([CodeSigningConfig] -> ShowS)
-> Show CodeSigningConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeSigningConfig] -> ShowS
$cshowList :: [CodeSigningConfig] -> ShowS
show :: CodeSigningConfig -> String
$cshow :: CodeSigningConfig -> String
showsPrec :: Int -> CodeSigningConfig -> ShowS
$cshowsPrec :: Int -> CodeSigningConfig -> ShowS
Prelude.Show, (forall x. CodeSigningConfig -> Rep CodeSigningConfig x)
-> (forall x. Rep CodeSigningConfig x -> CodeSigningConfig)
-> Generic CodeSigningConfig
forall x. Rep CodeSigningConfig x -> CodeSigningConfig
forall x. CodeSigningConfig -> Rep CodeSigningConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeSigningConfig x -> CodeSigningConfig
$cfrom :: forall x. CodeSigningConfig -> Rep CodeSigningConfig x
Prelude.Generic)
newCodeSigningConfig ::
Prelude.Text ->
Prelude.Text ->
AllowedPublishers ->
CodeSigningPolicies ->
Prelude.Text ->
CodeSigningConfig
newCodeSigningConfig :: Text
-> Text
-> AllowedPublishers
-> CodeSigningPolicies
-> Text
-> CodeSigningConfig
newCodeSigningConfig
Text
pCodeSigningConfigId_
Text
pCodeSigningConfigArn_
AllowedPublishers
pAllowedPublishers_
CodeSigningPolicies
pCodeSigningPolicies_
Text
pLastModified_ =
CodeSigningConfig' :: Maybe Text
-> Text
-> Text
-> AllowedPublishers
-> CodeSigningPolicies
-> Text
-> CodeSigningConfig
CodeSigningConfig'
{ $sel:description:CodeSigningConfig' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:codeSigningConfigId:CodeSigningConfig' :: Text
codeSigningConfigId = Text
pCodeSigningConfigId_,
$sel:codeSigningConfigArn:CodeSigningConfig' :: Text
codeSigningConfigArn = Text
pCodeSigningConfigArn_,
$sel:allowedPublishers:CodeSigningConfig' :: AllowedPublishers
allowedPublishers = AllowedPublishers
pAllowedPublishers_,
$sel:codeSigningPolicies:CodeSigningConfig' :: CodeSigningPolicies
codeSigningPolicies = CodeSigningPolicies
pCodeSigningPolicies_,
$sel:lastModified:CodeSigningConfig' :: Text
lastModified = Text
pLastModified_
}
codeSigningConfig_description :: Lens.Lens' CodeSigningConfig (Prelude.Maybe Prelude.Text)
codeSigningConfig_description :: (Maybe Text -> f (Maybe Text))
-> CodeSigningConfig -> f CodeSigningConfig
codeSigningConfig_description = (CodeSigningConfig -> Maybe Text)
-> (CodeSigningConfig -> Maybe Text -> CodeSigningConfig)
-> Lens
CodeSigningConfig CodeSigningConfig (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeSigningConfig' {Maybe Text
description :: Maybe Text
$sel:description:CodeSigningConfig' :: CodeSigningConfig -> Maybe Text
description} -> Maybe Text
description) (\s :: CodeSigningConfig
s@CodeSigningConfig' {} Maybe Text
a -> CodeSigningConfig
s {$sel:description:CodeSigningConfig' :: Maybe Text
description = Maybe Text
a} :: CodeSigningConfig)
codeSigningConfig_codeSigningConfigId :: Lens.Lens' CodeSigningConfig Prelude.Text
codeSigningConfig_codeSigningConfigId :: (Text -> f Text) -> CodeSigningConfig -> f CodeSigningConfig
codeSigningConfig_codeSigningConfigId = (CodeSigningConfig -> Text)
-> (CodeSigningConfig -> Text -> CodeSigningConfig)
-> Lens CodeSigningConfig CodeSigningConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeSigningConfig' {Text
codeSigningConfigId :: Text
$sel:codeSigningConfigId:CodeSigningConfig' :: CodeSigningConfig -> Text
codeSigningConfigId} -> Text
codeSigningConfigId) (\s :: CodeSigningConfig
s@CodeSigningConfig' {} Text
a -> CodeSigningConfig
s {$sel:codeSigningConfigId:CodeSigningConfig' :: Text
codeSigningConfigId = Text
a} :: CodeSigningConfig)
codeSigningConfig_codeSigningConfigArn :: Lens.Lens' CodeSigningConfig Prelude.Text
codeSigningConfig_codeSigningConfigArn :: (Text -> f Text) -> CodeSigningConfig -> f CodeSigningConfig
codeSigningConfig_codeSigningConfigArn = (CodeSigningConfig -> Text)
-> (CodeSigningConfig -> Text -> CodeSigningConfig)
-> Lens CodeSigningConfig CodeSigningConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeSigningConfig' {Text
codeSigningConfigArn :: Text
$sel:codeSigningConfigArn:CodeSigningConfig' :: CodeSigningConfig -> Text
codeSigningConfigArn} -> Text
codeSigningConfigArn) (\s :: CodeSigningConfig
s@CodeSigningConfig' {} Text
a -> CodeSigningConfig
s {$sel:codeSigningConfigArn:CodeSigningConfig' :: Text
codeSigningConfigArn = Text
a} :: CodeSigningConfig)
codeSigningConfig_allowedPublishers :: Lens.Lens' CodeSigningConfig AllowedPublishers
codeSigningConfig_allowedPublishers :: (AllowedPublishers -> f AllowedPublishers)
-> CodeSigningConfig -> f CodeSigningConfig
codeSigningConfig_allowedPublishers = (CodeSigningConfig -> AllowedPublishers)
-> (CodeSigningConfig -> AllowedPublishers -> CodeSigningConfig)
-> Lens
CodeSigningConfig
CodeSigningConfig
AllowedPublishers
AllowedPublishers
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeSigningConfig' {AllowedPublishers
allowedPublishers :: AllowedPublishers
$sel:allowedPublishers:CodeSigningConfig' :: CodeSigningConfig -> AllowedPublishers
allowedPublishers} -> AllowedPublishers
allowedPublishers) (\s :: CodeSigningConfig
s@CodeSigningConfig' {} AllowedPublishers
a -> CodeSigningConfig
s {$sel:allowedPublishers:CodeSigningConfig' :: AllowedPublishers
allowedPublishers = AllowedPublishers
a} :: CodeSigningConfig)
codeSigningConfig_codeSigningPolicies :: Lens.Lens' CodeSigningConfig CodeSigningPolicies
codeSigningConfig_codeSigningPolicies :: (CodeSigningPolicies -> f CodeSigningPolicies)
-> CodeSigningConfig -> f CodeSigningConfig
codeSigningConfig_codeSigningPolicies = (CodeSigningConfig -> CodeSigningPolicies)
-> (CodeSigningConfig -> CodeSigningPolicies -> CodeSigningConfig)
-> Lens
CodeSigningConfig
CodeSigningConfig
CodeSigningPolicies
CodeSigningPolicies
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeSigningConfig' {CodeSigningPolicies
codeSigningPolicies :: CodeSigningPolicies
$sel:codeSigningPolicies:CodeSigningConfig' :: CodeSigningConfig -> CodeSigningPolicies
codeSigningPolicies} -> CodeSigningPolicies
codeSigningPolicies) (\s :: CodeSigningConfig
s@CodeSigningConfig' {} CodeSigningPolicies
a -> CodeSigningConfig
s {$sel:codeSigningPolicies:CodeSigningConfig' :: CodeSigningPolicies
codeSigningPolicies = CodeSigningPolicies
a} :: CodeSigningConfig)
codeSigningConfig_lastModified :: Lens.Lens' CodeSigningConfig Prelude.Text
codeSigningConfig_lastModified :: (Text -> f Text) -> CodeSigningConfig -> f CodeSigningConfig
codeSigningConfig_lastModified = (CodeSigningConfig -> Text)
-> (CodeSigningConfig -> Text -> CodeSigningConfig)
-> Lens CodeSigningConfig CodeSigningConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeSigningConfig' {Text
lastModified :: Text
$sel:lastModified:CodeSigningConfig' :: CodeSigningConfig -> Text
lastModified} -> Text
lastModified) (\s :: CodeSigningConfig
s@CodeSigningConfig' {} Text
a -> CodeSigningConfig
s {$sel:lastModified:CodeSigningConfig' :: Text
lastModified = Text
a} :: CodeSigningConfig)
instance Core.FromJSON CodeSigningConfig where
parseJSON :: Value -> Parser CodeSigningConfig
parseJSON =
String
-> (Object -> Parser CodeSigningConfig)
-> Value
-> Parser CodeSigningConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CodeSigningConfig"
( \Object
x ->
Maybe Text
-> Text
-> Text
-> AllowedPublishers
-> CodeSigningPolicies
-> Text
-> CodeSigningConfig
CodeSigningConfig'
(Maybe Text
-> Text
-> Text
-> AllowedPublishers
-> CodeSigningPolicies
-> Text
-> CodeSigningConfig)
-> Parser (Maybe Text)
-> Parser
(Text
-> Text
-> AllowedPublishers
-> CodeSigningPolicies
-> Text
-> CodeSigningConfig)
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
"Description")
Parser
(Text
-> Text
-> AllowedPublishers
-> CodeSigningPolicies
-> Text
-> CodeSigningConfig)
-> Parser Text
-> Parser
(Text
-> AllowedPublishers
-> CodeSigningPolicies
-> Text
-> CodeSigningConfig)
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
"CodeSigningConfigId")
Parser
(Text
-> AllowedPublishers
-> CodeSigningPolicies
-> Text
-> CodeSigningConfig)
-> Parser Text
-> Parser
(AllowedPublishers
-> CodeSigningPolicies -> Text -> CodeSigningConfig)
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
"CodeSigningConfigArn")
Parser
(AllowedPublishers
-> CodeSigningPolicies -> Text -> CodeSigningConfig)
-> Parser AllowedPublishers
-> Parser (CodeSigningPolicies -> Text -> CodeSigningConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AllowedPublishers
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"AllowedPublishers")
Parser (CodeSigningPolicies -> Text -> CodeSigningConfig)
-> Parser CodeSigningPolicies -> Parser (Text -> CodeSigningConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser CodeSigningPolicies
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CodeSigningPolicies")
Parser (Text -> CodeSigningConfig)
-> Parser Text -> Parser CodeSigningConfig
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
"LastModified")
)
instance Prelude.Hashable CodeSigningConfig
instance Prelude.NFData CodeSigningConfig