{-# 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.AllowedPublishers 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 AllowedPublishers = AllowedPublishers'
{
AllowedPublishers -> NonEmpty Text
signingProfileVersionArns :: Prelude.NonEmpty Prelude.Text
}
deriving (AllowedPublishers -> AllowedPublishers -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AllowedPublishers -> AllowedPublishers -> Bool
$c/= :: AllowedPublishers -> AllowedPublishers -> Bool
== :: AllowedPublishers -> AllowedPublishers -> Bool
$c== :: AllowedPublishers -> AllowedPublishers -> Bool
Prelude.Eq, ReadPrec [AllowedPublishers]
ReadPrec AllowedPublishers
Int -> ReadS AllowedPublishers
ReadS [AllowedPublishers]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AllowedPublishers]
$creadListPrec :: ReadPrec [AllowedPublishers]
readPrec :: ReadPrec AllowedPublishers
$creadPrec :: ReadPrec AllowedPublishers
readList :: ReadS [AllowedPublishers]
$creadList :: ReadS [AllowedPublishers]
readsPrec :: Int -> ReadS AllowedPublishers
$creadsPrec :: Int -> ReadS AllowedPublishers
Prelude.Read, Int -> AllowedPublishers -> ShowS
[AllowedPublishers] -> ShowS
AllowedPublishers -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AllowedPublishers] -> ShowS
$cshowList :: [AllowedPublishers] -> ShowS
show :: AllowedPublishers -> String
$cshow :: AllowedPublishers -> String
showsPrec :: Int -> AllowedPublishers -> ShowS
$cshowsPrec :: Int -> AllowedPublishers -> ShowS
Prelude.Show, forall x. Rep AllowedPublishers x -> AllowedPublishers
forall x. AllowedPublishers -> Rep AllowedPublishers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AllowedPublishers x -> AllowedPublishers
$cfrom :: forall x. AllowedPublishers -> Rep AllowedPublishers x
Prelude.Generic)
newAllowedPublishers ::
Prelude.NonEmpty Prelude.Text ->
AllowedPublishers
newAllowedPublishers :: NonEmpty Text -> AllowedPublishers
newAllowedPublishers NonEmpty Text
pSigningProfileVersionArns_ =
AllowedPublishers'
{ $sel:signingProfileVersionArns:AllowedPublishers' :: NonEmpty Text
signingProfileVersionArns =
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pSigningProfileVersionArns_
}
allowedPublishers_signingProfileVersionArns :: Lens.Lens' AllowedPublishers (Prelude.NonEmpty Prelude.Text)
allowedPublishers_signingProfileVersionArns :: Lens' AllowedPublishers (NonEmpty Text)
allowedPublishers_signingProfileVersionArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllowedPublishers' {NonEmpty Text
signingProfileVersionArns :: NonEmpty Text
$sel:signingProfileVersionArns:AllowedPublishers' :: AllowedPublishers -> NonEmpty Text
signingProfileVersionArns} -> NonEmpty Text
signingProfileVersionArns) (\s :: AllowedPublishers
s@AllowedPublishers' {} NonEmpty Text
a -> AllowedPublishers
s {$sel:signingProfileVersionArns:AllowedPublishers' :: NonEmpty Text
signingProfileVersionArns = NonEmpty Text
a} :: AllowedPublishers) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON AllowedPublishers where
parseJSON :: Value -> Parser AllowedPublishers
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AllowedPublishers"
( \Object
x ->
NonEmpty Text -> AllowedPublishers
AllowedPublishers'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SigningProfileVersionArns")
)
instance Prelude.Hashable AllowedPublishers where
hashWithSalt :: Int -> AllowedPublishers -> Int
hashWithSalt Int
_salt AllowedPublishers' {NonEmpty Text
signingProfileVersionArns :: NonEmpty Text
$sel:signingProfileVersionArns:AllowedPublishers' :: AllowedPublishers -> NonEmpty Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Text
signingProfileVersionArns
instance Prelude.NFData AllowedPublishers where
rnf :: AllowedPublishers -> ()
rnf AllowedPublishers' {NonEmpty Text
signingProfileVersionArns :: NonEmpty Text
$sel:signingProfileVersionArns:AllowedPublishers' :: AllowedPublishers -> NonEmpty Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Text
signingProfileVersionArns
instance Data.ToJSON AllowedPublishers where
toJSON :: AllowedPublishers -> Value
toJSON AllowedPublishers' {NonEmpty Text
signingProfileVersionArns :: NonEmpty Text
$sel:signingProfileVersionArns:AllowedPublishers' :: AllowedPublishers -> NonEmpty Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"SigningProfileVersionArns"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Text
signingProfileVersionArns
)
]
)