{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Signer.Types.SigningProfile
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Signer.Types.SigningProfile where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Signer.Types.SignatureValidityPeriod
import Amazonka.Signer.Types.SigningMaterial
import Amazonka.Signer.Types.SigningProfileStatus

-- | Contains information about the ACM certificates and code signing
-- configuration parameters that can be used by a given code signing user.
--
-- /See:/ 'newSigningProfile' smart constructor.
data SigningProfile = SigningProfile'
  { -- | The status of a code signing profile.
    SigningProfile -> Maybe SigningProfileStatus
status :: Prelude.Maybe SigningProfileStatus,
    -- | The name of the signing platform.
    SigningProfile -> Maybe Text
platformDisplayName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the signing profile.
    SigningProfile -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The ACM certificate that is available for use by a signing profile.
    SigningProfile -> Maybe SigningMaterial
signingMaterial :: Prelude.Maybe SigningMaterial,
    -- | The version of a signing profile.
    SigningProfile -> Maybe Text
profileVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the signing profile.
    SigningProfile -> Maybe Text
profileName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of a signing profile, including the profile version.
    SigningProfile -> Maybe Text
profileVersionArn :: Prelude.Maybe Prelude.Text,
    -- | The ID of a platform that is available for use by a signing profile.
    SigningProfile -> Maybe Text
platformId :: Prelude.Maybe Prelude.Text,
    -- | The validity period for a signing job created using this signing
    -- profile.
    SigningProfile -> Maybe SignatureValidityPeriod
signatureValidityPeriod :: Prelude.Maybe SignatureValidityPeriod,
    -- | The parameters that are available for use by a code signing user.
    SigningProfile -> Maybe (HashMap Text Text)
signingParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A list of tags associated with the signing profile.
    SigningProfile -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (SigningProfile -> SigningProfile -> Bool
(SigningProfile -> SigningProfile -> Bool)
-> (SigningProfile -> SigningProfile -> Bool) -> Eq SigningProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SigningProfile -> SigningProfile -> Bool
$c/= :: SigningProfile -> SigningProfile -> Bool
== :: SigningProfile -> SigningProfile -> Bool
$c== :: SigningProfile -> SigningProfile -> Bool
Prelude.Eq, ReadPrec [SigningProfile]
ReadPrec SigningProfile
Int -> ReadS SigningProfile
ReadS [SigningProfile]
(Int -> ReadS SigningProfile)
-> ReadS [SigningProfile]
-> ReadPrec SigningProfile
-> ReadPrec [SigningProfile]
-> Read SigningProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SigningProfile]
$creadListPrec :: ReadPrec [SigningProfile]
readPrec :: ReadPrec SigningProfile
$creadPrec :: ReadPrec SigningProfile
readList :: ReadS [SigningProfile]
$creadList :: ReadS [SigningProfile]
readsPrec :: Int -> ReadS SigningProfile
$creadsPrec :: Int -> ReadS SigningProfile
Prelude.Read, 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
showList :: [SigningProfile] -> ShowS
$cshowList :: [SigningProfile] -> ShowS
show :: SigningProfile -> String
$cshow :: SigningProfile -> String
showsPrec :: Int -> SigningProfile -> ShowS
$cshowsPrec :: Int -> SigningProfile -> ShowS
Prelude.Show, (forall x. SigningProfile -> Rep SigningProfile x)
-> (forall x. Rep SigningProfile x -> SigningProfile)
-> Generic SigningProfile
forall x. Rep SigningProfile x -> SigningProfile
forall x. SigningProfile -> Rep SigningProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SigningProfile x -> SigningProfile
$cfrom :: forall x. SigningProfile -> Rep SigningProfile x
Prelude.Generic)

-- |
-- Create a value of 'SigningProfile' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'signingProfile_status' - The status of a code signing profile.
--
-- 'platformDisplayName', 'signingProfile_platformDisplayName' - The name of the signing platform.
--
-- 'arn', 'signingProfile_arn' - The Amazon Resource Name (ARN) for the signing profile.
--
-- 'signingMaterial', 'signingProfile_signingMaterial' - The ACM certificate that is available for use by a signing profile.
--
-- 'profileVersion', 'signingProfile_profileVersion' - The version of a signing profile.
--
-- 'profileName', 'signingProfile_profileName' - The name of the signing profile.
--
-- 'profileVersionArn', 'signingProfile_profileVersionArn' - The ARN of a signing profile, including the profile version.
--
-- 'platformId', 'signingProfile_platformId' - The ID of a platform that is available for use by a signing profile.
--
-- 'signatureValidityPeriod', 'signingProfile_signatureValidityPeriod' - The validity period for a signing job created using this signing
-- profile.
--
-- 'signingParameters', 'signingProfile_signingParameters' - The parameters that are available for use by a code signing user.
--
-- 'tags', 'signingProfile_tags' - A list of tags associated with the signing profile.
newSigningProfile ::
  SigningProfile
newSigningProfile :: SigningProfile
newSigningProfile =
  SigningProfile' :: Maybe SigningProfileStatus
-> Maybe Text
-> Maybe Text
-> Maybe SigningMaterial
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SignatureValidityPeriod
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> SigningProfile
SigningProfile'
    { $sel:status:SigningProfile' :: Maybe SigningProfileStatus
status = Maybe SigningProfileStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:platformDisplayName:SigningProfile' :: Maybe Text
platformDisplayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:SigningProfile' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:signingMaterial:SigningProfile' :: Maybe SigningMaterial
signingMaterial = Maybe SigningMaterial
forall a. Maybe a
Prelude.Nothing,
      $sel:profileVersion:SigningProfile' :: Maybe Text
profileVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:profileName:SigningProfile' :: Maybe Text
profileName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:profileVersionArn:SigningProfile' :: Maybe Text
profileVersionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:platformId:SigningProfile' :: Maybe Text
platformId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:signatureValidityPeriod:SigningProfile' :: Maybe SignatureValidityPeriod
signatureValidityPeriod = Maybe SignatureValidityPeriod
forall a. Maybe a
Prelude.Nothing,
      $sel:signingParameters:SigningProfile' :: Maybe (HashMap Text Text)
signingParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:SigningProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of a code signing profile.
signingProfile_status :: Lens.Lens' SigningProfile (Prelude.Maybe SigningProfileStatus)
signingProfile_status :: (Maybe SigningProfileStatus -> f (Maybe SigningProfileStatus))
-> SigningProfile -> f SigningProfile
signingProfile_status = (SigningProfile -> Maybe SigningProfileStatus)
-> (SigningProfile -> Maybe SigningProfileStatus -> SigningProfile)
-> Lens
     SigningProfile
     SigningProfile
     (Maybe SigningProfileStatus)
     (Maybe SigningProfileStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe SigningProfileStatus
status :: Maybe SigningProfileStatus
$sel:status:SigningProfile' :: SigningProfile -> Maybe SigningProfileStatus
status} -> Maybe SigningProfileStatus
status) (\s :: SigningProfile
s@SigningProfile' {} Maybe SigningProfileStatus
a -> SigningProfile
s {$sel:status:SigningProfile' :: Maybe SigningProfileStatus
status = Maybe SigningProfileStatus
a} :: SigningProfile)

-- | The name of the signing platform.
signingProfile_platformDisplayName :: Lens.Lens' SigningProfile (Prelude.Maybe Prelude.Text)
signingProfile_platformDisplayName :: (Maybe Text -> f (Maybe Text))
-> SigningProfile -> f SigningProfile
signingProfile_platformDisplayName = (SigningProfile -> Maybe Text)
-> (SigningProfile -> Maybe Text -> SigningProfile)
-> Lens SigningProfile SigningProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe Text
platformDisplayName :: Maybe Text
$sel:platformDisplayName:SigningProfile' :: SigningProfile -> Maybe Text
platformDisplayName} -> Maybe Text
platformDisplayName) (\s :: SigningProfile
s@SigningProfile' {} Maybe Text
a -> SigningProfile
s {$sel:platformDisplayName:SigningProfile' :: Maybe Text
platformDisplayName = Maybe Text
a} :: SigningProfile)

-- | The Amazon Resource Name (ARN) for the signing profile.
signingProfile_arn :: Lens.Lens' SigningProfile (Prelude.Maybe Prelude.Text)
signingProfile_arn :: (Maybe Text -> f (Maybe Text))
-> SigningProfile -> f SigningProfile
signingProfile_arn = (SigningProfile -> Maybe Text)
-> (SigningProfile -> Maybe Text -> SigningProfile)
-> Lens SigningProfile SigningProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe Text
arn :: Maybe Text
$sel:arn:SigningProfile' :: SigningProfile -> Maybe Text
arn} -> Maybe Text
arn) (\s :: SigningProfile
s@SigningProfile' {} Maybe Text
a -> SigningProfile
s {$sel:arn:SigningProfile' :: Maybe Text
arn = Maybe Text
a} :: SigningProfile)

-- | The ACM certificate that is available for use by a signing profile.
signingProfile_signingMaterial :: Lens.Lens' SigningProfile (Prelude.Maybe SigningMaterial)
signingProfile_signingMaterial :: (Maybe SigningMaterial -> f (Maybe SigningMaterial))
-> SigningProfile -> f SigningProfile
signingProfile_signingMaterial = (SigningProfile -> Maybe SigningMaterial)
-> (SigningProfile -> Maybe SigningMaterial -> SigningProfile)
-> Lens
     SigningProfile
     SigningProfile
     (Maybe SigningMaterial)
     (Maybe SigningMaterial)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe SigningMaterial
signingMaterial :: Maybe SigningMaterial
$sel:signingMaterial:SigningProfile' :: SigningProfile -> Maybe SigningMaterial
signingMaterial} -> Maybe SigningMaterial
signingMaterial) (\s :: SigningProfile
s@SigningProfile' {} Maybe SigningMaterial
a -> SigningProfile
s {$sel:signingMaterial:SigningProfile' :: Maybe SigningMaterial
signingMaterial = Maybe SigningMaterial
a} :: SigningProfile)

-- | The version of a signing profile.
signingProfile_profileVersion :: Lens.Lens' SigningProfile (Prelude.Maybe Prelude.Text)
signingProfile_profileVersion :: (Maybe Text -> f (Maybe Text))
-> SigningProfile -> f SigningProfile
signingProfile_profileVersion = (SigningProfile -> Maybe Text)
-> (SigningProfile -> Maybe Text -> SigningProfile)
-> Lens SigningProfile SigningProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe Text
profileVersion :: Maybe Text
$sel:profileVersion:SigningProfile' :: SigningProfile -> Maybe Text
profileVersion} -> Maybe Text
profileVersion) (\s :: SigningProfile
s@SigningProfile' {} Maybe Text
a -> SigningProfile
s {$sel:profileVersion:SigningProfile' :: Maybe Text
profileVersion = Maybe Text
a} :: SigningProfile)

-- | The name of the signing profile.
signingProfile_profileName :: Lens.Lens' SigningProfile (Prelude.Maybe Prelude.Text)
signingProfile_profileName :: (Maybe Text -> f (Maybe Text))
-> SigningProfile -> f SigningProfile
signingProfile_profileName = (SigningProfile -> Maybe Text)
-> (SigningProfile -> Maybe Text -> SigningProfile)
-> Lens SigningProfile SigningProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe Text
profileName :: Maybe Text
$sel:profileName:SigningProfile' :: SigningProfile -> Maybe Text
profileName} -> Maybe Text
profileName) (\s :: SigningProfile
s@SigningProfile' {} Maybe Text
a -> SigningProfile
s {$sel:profileName:SigningProfile' :: Maybe Text
profileName = Maybe Text
a} :: SigningProfile)

-- | The ARN of a signing profile, including the profile version.
signingProfile_profileVersionArn :: Lens.Lens' SigningProfile (Prelude.Maybe Prelude.Text)
signingProfile_profileVersionArn :: (Maybe Text -> f (Maybe Text))
-> SigningProfile -> f SigningProfile
signingProfile_profileVersionArn = (SigningProfile -> Maybe Text)
-> (SigningProfile -> Maybe Text -> SigningProfile)
-> Lens SigningProfile SigningProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe Text
profileVersionArn :: Maybe Text
$sel:profileVersionArn:SigningProfile' :: SigningProfile -> Maybe Text
profileVersionArn} -> Maybe Text
profileVersionArn) (\s :: SigningProfile
s@SigningProfile' {} Maybe Text
a -> SigningProfile
s {$sel:profileVersionArn:SigningProfile' :: Maybe Text
profileVersionArn = Maybe Text
a} :: SigningProfile)

-- | The ID of a platform that is available for use by a signing profile.
signingProfile_platformId :: Lens.Lens' SigningProfile (Prelude.Maybe Prelude.Text)
signingProfile_platformId :: (Maybe Text -> f (Maybe Text))
-> SigningProfile -> f SigningProfile
signingProfile_platformId = (SigningProfile -> Maybe Text)
-> (SigningProfile -> Maybe Text -> SigningProfile)
-> Lens SigningProfile SigningProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe Text
platformId :: Maybe Text
$sel:platformId:SigningProfile' :: SigningProfile -> Maybe Text
platformId} -> Maybe Text
platformId) (\s :: SigningProfile
s@SigningProfile' {} Maybe Text
a -> SigningProfile
s {$sel:platformId:SigningProfile' :: Maybe Text
platformId = Maybe Text
a} :: SigningProfile)

-- | The validity period for a signing job created using this signing
-- profile.
signingProfile_signatureValidityPeriod :: Lens.Lens' SigningProfile (Prelude.Maybe SignatureValidityPeriod)
signingProfile_signatureValidityPeriod :: (Maybe SignatureValidityPeriod
 -> f (Maybe SignatureValidityPeriod))
-> SigningProfile -> f SigningProfile
signingProfile_signatureValidityPeriod = (SigningProfile -> Maybe SignatureValidityPeriod)
-> (SigningProfile
    -> Maybe SignatureValidityPeriod -> SigningProfile)
-> Lens
     SigningProfile
     SigningProfile
     (Maybe SignatureValidityPeriod)
     (Maybe SignatureValidityPeriod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe SignatureValidityPeriod
signatureValidityPeriod :: Maybe SignatureValidityPeriod
$sel:signatureValidityPeriod:SigningProfile' :: SigningProfile -> Maybe SignatureValidityPeriod
signatureValidityPeriod} -> Maybe SignatureValidityPeriod
signatureValidityPeriod) (\s :: SigningProfile
s@SigningProfile' {} Maybe SignatureValidityPeriod
a -> SigningProfile
s {$sel:signatureValidityPeriod:SigningProfile' :: Maybe SignatureValidityPeriod
signatureValidityPeriod = Maybe SignatureValidityPeriod
a} :: SigningProfile)

-- | The parameters that are available for use by a code signing user.
signingProfile_signingParameters :: Lens.Lens' SigningProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
signingProfile_signingParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SigningProfile -> f SigningProfile
signingProfile_signingParameters = (SigningProfile -> Maybe (HashMap Text Text))
-> (SigningProfile -> Maybe (HashMap Text Text) -> SigningProfile)
-> Lens
     SigningProfile
     SigningProfile
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe (HashMap Text Text)
signingParameters :: Maybe (HashMap Text Text)
$sel:signingParameters:SigningProfile' :: SigningProfile -> Maybe (HashMap Text Text)
signingParameters} -> Maybe (HashMap Text Text)
signingParameters) (\s :: SigningProfile
s@SigningProfile' {} Maybe (HashMap Text Text)
a -> SigningProfile
s {$sel:signingParameters:SigningProfile' :: Maybe (HashMap Text Text)
signingParameters = Maybe (HashMap Text Text)
a} :: SigningProfile) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> SigningProfile -> f SigningProfile)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SigningProfile
-> f SigningProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of tags associated with the signing profile.
signingProfile_tags :: Lens.Lens' SigningProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
signingProfile_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SigningProfile -> f SigningProfile
signingProfile_tags = (SigningProfile -> Maybe (HashMap Text Text))
-> (SigningProfile -> Maybe (HashMap Text Text) -> SigningProfile)
-> Lens
     SigningProfile
     SigningProfile
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfile' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:SigningProfile' :: SigningProfile -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: SigningProfile
s@SigningProfile' {} Maybe (HashMap Text Text)
a -> SigningProfile
s {$sel:tags:SigningProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: SigningProfile) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> SigningProfile -> f SigningProfile)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SigningProfile
-> f SigningProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON SigningProfile where
  parseJSON :: Value -> Parser SigningProfile
parseJSON =
    String
-> (Object -> Parser SigningProfile)
-> Value
-> Parser SigningProfile
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SigningProfile"
      ( \Object
x ->
          Maybe SigningProfileStatus
-> Maybe Text
-> Maybe Text
-> Maybe SigningMaterial
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SignatureValidityPeriod
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> SigningProfile
SigningProfile'
            (Maybe SigningProfileStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe SigningMaterial
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe SignatureValidityPeriod
 -> Maybe (HashMap Text Text)
 -> Maybe (HashMap Text Text)
 -> SigningProfile)
-> Parser (Maybe SigningProfileStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SigningMaterial
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignatureValidityPeriod
      -> Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text)
      -> SigningProfile)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SigningProfileStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SigningMaterial
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignatureValidityPeriod
   -> Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text)
   -> SigningProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SigningMaterial
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignatureValidityPeriod
      -> Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text)
      -> SigningProfile)
forall (f :: * -> *) a b. Applicative f => 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
"platformDisplayName")
            Parser
  (Maybe Text
   -> Maybe SigningMaterial
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignatureValidityPeriod
   -> Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text)
   -> SigningProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe SigningMaterial
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignatureValidityPeriod
      -> Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text)
      -> SigningProfile)
forall (f :: * -> *) a b. Applicative f => 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
"arn")
            Parser
  (Maybe SigningMaterial
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignatureValidityPeriod
   -> Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text)
   -> SigningProfile)
-> Parser (Maybe SigningMaterial)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignatureValidityPeriod
      -> Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text)
      -> SigningProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SigningMaterial)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"signingMaterial")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignatureValidityPeriod
   -> Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text)
   -> SigningProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignatureValidityPeriod
      -> Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text)
      -> SigningProfile)
forall (f :: * -> *) a b. Applicative f => 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
"profileVersion")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignatureValidityPeriod
   -> Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text)
   -> SigningProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SignatureValidityPeriod
      -> Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text)
      -> SigningProfile)
forall (f :: * -> *) a b. Applicative f => 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
"profileName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SignatureValidityPeriod
   -> Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text)
   -> SigningProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SignatureValidityPeriod
      -> Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text)
      -> SigningProfile)
forall (f :: * -> *) a b. Applicative f => 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
"profileVersionArn")
            Parser
  (Maybe Text
   -> Maybe SignatureValidityPeriod
   -> Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text)
   -> SigningProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe SignatureValidityPeriod
      -> Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text)
      -> SigningProfile)
forall (f :: * -> *) a b. Applicative f => 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
"platformId")
            Parser
  (Maybe SignatureValidityPeriod
   -> Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text)
   -> SigningProfile)
-> Parser (Maybe SignatureValidityPeriod)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text) -> SigningProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SignatureValidityPeriod)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"signatureValidityPeriod")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text) -> SigningProfile)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe (HashMap Text Text) -> SigningProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"signingParameters"
                            Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe (HashMap Text Text) -> SigningProfile)
-> Parser (Maybe (HashMap Text Text)) -> Parser SigningProfile
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable SigningProfile

instance Prelude.NFData SigningProfile