module Stratosphere.Signer.SigningProfile (
        module Exports, SigningProfile(..), mkSigningProfile
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Signer.SigningProfile.SignatureValidityPeriodProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data SigningProfile
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-signingprofile.html>
    SigningProfile {SigningProfile -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-signingprofile.html#cfn-signer-signingprofile-platformid>
                    SigningProfile -> Value Text
platformId :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-signingprofile.html#cfn-signer-signingprofile-signaturevalidityperiod>
                    SigningProfile -> Maybe SignatureValidityPeriodProperty
signatureValidityPeriod :: (Prelude.Maybe SignatureValidityPeriodProperty),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-signer-signingprofile.html#cfn-signer-signingprofile-tags>
                    SigningProfile -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (SigningProfile -> SigningProfile -> Bool
(SigningProfile -> SigningProfile -> Bool)
-> (SigningProfile -> SigningProfile -> Bool) -> Eq SigningProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SigningProfile -> SigningProfile -> Bool
== :: SigningProfile -> SigningProfile -> Bool
$c/= :: SigningProfile -> SigningProfile -> Bool
/= :: SigningProfile -> SigningProfile -> Bool
Prelude.Eq, Int -> SigningProfile -> ShowS
[SigningProfile] -> ShowS
SigningProfile -> String
(Int -> SigningProfile -> ShowS)
-> (SigningProfile -> String)
-> ([SigningProfile] -> ShowS)
-> Show SigningProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SigningProfile -> ShowS
showsPrec :: Int -> SigningProfile -> ShowS
$cshow :: SigningProfile -> String
show :: SigningProfile -> String
$cshowList :: [SigningProfile] -> ShowS
showList :: [SigningProfile] -> ShowS
Prelude.Show)
mkSigningProfile :: Value Prelude.Text -> SigningProfile
mkSigningProfile :: Value Text -> SigningProfile
mkSigningProfile Value Text
platformId
  = SigningProfile
      {haddock_workaround_ :: ()
haddock_workaround_ = (), platformId :: Value Text
platformId = Value Text
platformId,
       signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
signatureValidityPeriod = Maybe SignatureValidityPeriodProperty
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SigningProfile where
  toResourceProperties :: SigningProfile -> ResourceProperties
toResourceProperties SigningProfile {Maybe [Tag]
Maybe SignatureValidityPeriodProperty
()
Value Text
haddock_workaround_ :: SigningProfile -> ()
platformId :: SigningProfile -> Value Text
signatureValidityPeriod :: SigningProfile -> Maybe SignatureValidityPeriodProperty
tags :: SigningProfile -> Maybe [Tag]
haddock_workaround_ :: ()
platformId :: Value Text
signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Signer::SigningProfile",
         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
"PlatformId" 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..= Value Text
platformId]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> SignatureValidityPeriodProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SignatureValidityPeriod"
                                 (SignatureValidityPeriodProperty -> (Key, Value))
-> Maybe SignatureValidityPeriodProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SignatureValidityPeriodProperty
signatureValidityPeriod,
                               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 SigningProfile where
  toJSON :: SigningProfile -> Value
toJSON SigningProfile {Maybe [Tag]
Maybe SignatureValidityPeriodProperty
()
Value Text
haddock_workaround_ :: SigningProfile -> ()
platformId :: SigningProfile -> Value Text
signatureValidityPeriod :: SigningProfile -> Maybe SignatureValidityPeriodProperty
tags :: SigningProfile -> Maybe [Tag]
haddock_workaround_ :: ()
platformId :: Value Text
signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
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
"PlatformId" 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..= Value Text
platformId]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> SignatureValidityPeriodProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SignatureValidityPeriod"
                    (SignatureValidityPeriodProperty -> (Key, Value))
-> Maybe SignatureValidityPeriodProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SignatureValidityPeriodProperty
signatureValidityPeriod,
                  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 "PlatformId" SigningProfile where
  type PropertyType "PlatformId" SigningProfile = Value Prelude.Text
  set :: PropertyType "PlatformId" SigningProfile
-> SigningProfile -> SigningProfile
set PropertyType "PlatformId" SigningProfile
newValue SigningProfile {Maybe [Tag]
Maybe SignatureValidityPeriodProperty
()
Value Text
haddock_workaround_ :: SigningProfile -> ()
platformId :: SigningProfile -> Value Text
signatureValidityPeriod :: SigningProfile -> Maybe SignatureValidityPeriodProperty
tags :: SigningProfile -> Maybe [Tag]
haddock_workaround_ :: ()
platformId :: Value Text
signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
tags :: Maybe [Tag]
..}
    = SigningProfile {platformId :: Value Text
platformId = PropertyType "PlatformId" SigningProfile
Value Text
newValue, Maybe [Tag]
Maybe SignatureValidityPeriodProperty
()
haddock_workaround_ :: ()
signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
tags :: Maybe [Tag]
..}
instance Property "SignatureValidityPeriod" SigningProfile where
  type PropertyType "SignatureValidityPeriod" SigningProfile = SignatureValidityPeriodProperty
  set :: PropertyType "SignatureValidityPeriod" SigningProfile
-> SigningProfile -> SigningProfile
set PropertyType "SignatureValidityPeriod" SigningProfile
newValue SigningProfile {Maybe [Tag]
Maybe SignatureValidityPeriodProperty
()
Value Text
haddock_workaround_ :: SigningProfile -> ()
platformId :: SigningProfile -> Value Text
signatureValidityPeriod :: SigningProfile -> Maybe SignatureValidityPeriodProperty
tags :: SigningProfile -> Maybe [Tag]
haddock_workaround_ :: ()
platformId :: Value Text
signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
tags :: Maybe [Tag]
..}
    = SigningProfile
        {signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
signatureValidityPeriod = SignatureValidityPeriodProperty
-> Maybe SignatureValidityPeriodProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SignatureValidityPeriod" SigningProfile
SignatureValidityPeriodProperty
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
platformId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
platformId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" SigningProfile where
  type PropertyType "Tags" SigningProfile = [Tag]
  set :: PropertyType "Tags" SigningProfile
-> SigningProfile -> SigningProfile
set PropertyType "Tags" SigningProfile
newValue SigningProfile {Maybe [Tag]
Maybe SignatureValidityPeriodProperty
()
Value Text
haddock_workaround_ :: SigningProfile -> ()
platformId :: SigningProfile -> Value Text
signatureValidityPeriod :: SigningProfile -> Maybe SignatureValidityPeriodProperty
tags :: SigningProfile -> Maybe [Tag]
haddock_workaround_ :: ()
platformId :: Value Text
signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
tags :: Maybe [Tag]
..}
    = SigningProfile {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" SigningProfile
newValue, Maybe SignatureValidityPeriodProperty
()
Value Text
haddock_workaround_ :: ()
platformId :: Value Text
signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
haddock_workaround_ :: ()
platformId :: Value Text
signatureValidityPeriod :: Maybe SignatureValidityPeriodProperty
..}