module Stratosphere.Lambda.CodeSigningConfig (
        module Exports, CodeSigningConfig(..), mkCodeSigningConfig
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lambda.CodeSigningConfig.AllowedPublishersProperty as Exports
import {-# SOURCE #-} Stratosphere.Lambda.CodeSigningConfig.CodeSigningPoliciesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data CodeSigningConfig
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html>
    CodeSigningConfig {CodeSigningConfig -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-allowedpublishers>
                       CodeSigningConfig -> AllowedPublishersProperty
allowedPublishers :: AllowedPublishersProperty,
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-codesigningpolicies>
                       CodeSigningConfig -> Maybe CodeSigningPoliciesProperty
codeSigningPolicies :: (Prelude.Maybe CodeSigningPoliciesProperty),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-description>
                       CodeSigningConfig -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-tags>
                       CodeSigningConfig -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (CodeSigningConfig -> CodeSigningConfig -> Bool
(CodeSigningConfig -> CodeSigningConfig -> Bool)
-> (CodeSigningConfig -> CodeSigningConfig -> Bool)
-> Eq CodeSigningConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CodeSigningConfig -> CodeSigningConfig -> Bool
== :: CodeSigningConfig -> CodeSigningConfig -> Bool
$c/= :: CodeSigningConfig -> CodeSigningConfig -> Bool
/= :: CodeSigningConfig -> CodeSigningConfig -> Bool
Prelude.Eq, 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
$cshowsPrec :: Int -> CodeSigningConfig -> ShowS
showsPrec :: Int -> CodeSigningConfig -> ShowS
$cshow :: CodeSigningConfig -> String
show :: CodeSigningConfig -> String
$cshowList :: [CodeSigningConfig] -> ShowS
showList :: [CodeSigningConfig] -> ShowS
Prelude.Show)
mkCodeSigningConfig ::
  AllowedPublishersProperty -> CodeSigningConfig
mkCodeSigningConfig :: AllowedPublishersProperty -> CodeSigningConfig
mkCodeSigningConfig AllowedPublishersProperty
allowedPublishers
  = CodeSigningConfig
      {haddock_workaround_ :: ()
haddock_workaround_ = (), allowedPublishers :: AllowedPublishersProperty
allowedPublishers = AllowedPublishersProperty
allowedPublishers,
       codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
codeSigningPolicies = Maybe CodeSigningPoliciesProperty
forall a. Maybe a
Prelude.Nothing,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CodeSigningConfig where
  toResourceProperties :: CodeSigningConfig -> ResourceProperties
toResourceProperties CodeSigningConfig {Maybe [Tag]
Maybe (Value Text)
Maybe CodeSigningPoliciesProperty
()
AllowedPublishersProperty
haddock_workaround_ :: CodeSigningConfig -> ()
allowedPublishers :: CodeSigningConfig -> AllowedPublishersProperty
codeSigningPolicies :: CodeSigningConfig -> Maybe CodeSigningPoliciesProperty
description :: CodeSigningConfig -> Maybe (Value Text)
tags :: CodeSigningConfig -> Maybe [Tag]
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lambda::CodeSigningConfig",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"AllowedPublishers" Key -> AllowedPublishersProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= AllowedPublishersProperty
allowedPublishers]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> CodeSigningPoliciesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CodeSigningPolicies" (CodeSigningPoliciesProperty -> (Key, Value))
-> Maybe CodeSigningPoliciesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CodeSigningPoliciesProperty
codeSigningPolicies,
                               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON CodeSigningConfig where
  toJSON :: CodeSigningConfig -> Value
toJSON CodeSigningConfig {Maybe [Tag]
Maybe (Value Text)
Maybe CodeSigningPoliciesProperty
()
AllowedPublishersProperty
haddock_workaround_ :: CodeSigningConfig -> ()
allowedPublishers :: CodeSigningConfig -> AllowedPublishersProperty
codeSigningPolicies :: CodeSigningConfig -> Maybe CodeSigningPoliciesProperty
description :: CodeSigningConfig -> Maybe (Value Text)
tags :: CodeSigningConfig -> Maybe [Tag]
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"AllowedPublishers" Key -> AllowedPublishersProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= AllowedPublishersProperty
allowedPublishers]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> CodeSigningPoliciesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CodeSigningPolicies" (CodeSigningPoliciesProperty -> (Key, Value))
-> Maybe CodeSigningPoliciesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CodeSigningPoliciesProperty
codeSigningPolicies,
                  Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "AllowedPublishers" CodeSigningConfig where
  type PropertyType "AllowedPublishers" CodeSigningConfig = AllowedPublishersProperty
  set :: PropertyType "AllowedPublishers" CodeSigningConfig
-> CodeSigningConfig -> CodeSigningConfig
set PropertyType "AllowedPublishers" CodeSigningConfig
newValue CodeSigningConfig {Maybe [Tag]
Maybe (Value Text)
Maybe CodeSigningPoliciesProperty
()
AllowedPublishersProperty
haddock_workaround_ :: CodeSigningConfig -> ()
allowedPublishers :: CodeSigningConfig -> AllowedPublishersProperty
codeSigningPolicies :: CodeSigningConfig -> Maybe CodeSigningPoliciesProperty
description :: CodeSigningConfig -> Maybe (Value Text)
tags :: CodeSigningConfig -> Maybe [Tag]
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = CodeSigningConfig {allowedPublishers :: AllowedPublishersProperty
allowedPublishers = PropertyType "AllowedPublishers" CodeSigningConfig
AllowedPublishersProperty
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe CodeSigningPoliciesProperty
()
haddock_workaround_ :: ()
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "CodeSigningPolicies" CodeSigningConfig where
  type PropertyType "CodeSigningPolicies" CodeSigningConfig = CodeSigningPoliciesProperty
  set :: PropertyType "CodeSigningPolicies" CodeSigningConfig
-> CodeSigningConfig -> CodeSigningConfig
set PropertyType "CodeSigningPolicies" CodeSigningConfig
newValue CodeSigningConfig {Maybe [Tag]
Maybe (Value Text)
Maybe CodeSigningPoliciesProperty
()
AllowedPublishersProperty
haddock_workaround_ :: CodeSigningConfig -> ()
allowedPublishers :: CodeSigningConfig -> AllowedPublishersProperty
codeSigningPolicies :: CodeSigningConfig -> Maybe CodeSigningPoliciesProperty
description :: CodeSigningConfig -> Maybe (Value Text)
tags :: CodeSigningConfig -> Maybe [Tag]
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = CodeSigningConfig
        {codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
codeSigningPolicies = CodeSigningPoliciesProperty -> Maybe CodeSigningPoliciesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CodeSigningPolicies" CodeSigningConfig
CodeSigningPoliciesProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
AllowedPublishersProperty
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Description" CodeSigningConfig where
  type PropertyType "Description" CodeSigningConfig = Value Prelude.Text
  set :: PropertyType "Description" CodeSigningConfig
-> CodeSigningConfig -> CodeSigningConfig
set PropertyType "Description" CodeSigningConfig
newValue CodeSigningConfig {Maybe [Tag]
Maybe (Value Text)
Maybe CodeSigningPoliciesProperty
()
AllowedPublishersProperty
haddock_workaround_ :: CodeSigningConfig -> ()
allowedPublishers :: CodeSigningConfig -> AllowedPublishersProperty
codeSigningPolicies :: CodeSigningConfig -> Maybe CodeSigningPoliciesProperty
description :: CodeSigningConfig -> Maybe (Value Text)
tags :: CodeSigningConfig -> Maybe [Tag]
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = CodeSigningConfig {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" CodeSigningConfig
Value Text
newValue, Maybe [Tag]
Maybe CodeSigningPoliciesProperty
()
AllowedPublishersProperty
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
tags :: Maybe [Tag]
..}
instance Property "Tags" CodeSigningConfig where
  type PropertyType "Tags" CodeSigningConfig = [Tag]
  set :: PropertyType "Tags" CodeSigningConfig
-> CodeSigningConfig -> CodeSigningConfig
set PropertyType "Tags" CodeSigningConfig
newValue CodeSigningConfig {Maybe [Tag]
Maybe (Value Text)
Maybe CodeSigningPoliciesProperty
()
AllowedPublishersProperty
haddock_workaround_ :: CodeSigningConfig -> ()
allowedPublishers :: CodeSigningConfig -> AllowedPublishersProperty
codeSigningPolicies :: CodeSigningConfig -> Maybe CodeSigningPoliciesProperty
description :: CodeSigningConfig -> Maybe (Value Text)
tags :: CodeSigningConfig -> Maybe [Tag]
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = CodeSigningConfig {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" CodeSigningConfig
newValue, Maybe (Value Text)
Maybe CodeSigningPoliciesProperty
()
AllowedPublishersProperty
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
description :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedPublishers :: AllowedPublishersProperty
codeSigningPolicies :: Maybe CodeSigningPoliciesProperty
description :: Maybe (Value Text)
..}