{-# 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.CodeCommit.Types.ApprovalRuleTemplate
-- 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.CodeCommit.Types.ApprovalRuleTemplate where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Returns information about an approval rule template.
--
-- /See:/ 'newApprovalRuleTemplate' smart constructor.
data ApprovalRuleTemplate = ApprovalRuleTemplate'
  { -- | The SHA-256 hash signature for the content of the approval rule
    -- template.
    ApprovalRuleTemplate -> Maybe Text
ruleContentSha256 :: Prelude.Maybe Prelude.Text,
    -- | The system-generated ID of the approval rule template.
    ApprovalRuleTemplate -> Maybe Text
approvalRuleTemplateId :: Prelude.Maybe Prelude.Text,
    -- | The date the approval rule template was most recently changed, in
    -- timestamp format.
    ApprovalRuleTemplate -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | The description of the approval rule template.
    ApprovalRuleTemplate -> Maybe Text
approvalRuleTemplateDescription :: Prelude.Maybe Prelude.Text,
    -- | The content of the approval rule template.
    ApprovalRuleTemplate -> Maybe Text
approvalRuleTemplateContent :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the user who made the most recent
    -- changes to the approval rule template.
    ApprovalRuleTemplate -> Maybe Text
lastModifiedUser :: Prelude.Maybe Prelude.Text,
    -- | The date the approval rule template was created, in timestamp format.
    ApprovalRuleTemplate -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The name of the approval rule template.
    ApprovalRuleTemplate -> Maybe Text
approvalRuleTemplateName :: Prelude.Maybe Prelude.Text
  }
  deriving (ApprovalRuleTemplate -> ApprovalRuleTemplate -> Bool
(ApprovalRuleTemplate -> ApprovalRuleTemplate -> Bool)
-> (ApprovalRuleTemplate -> ApprovalRuleTemplate -> Bool)
-> Eq ApprovalRuleTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApprovalRuleTemplate -> ApprovalRuleTemplate -> Bool
$c/= :: ApprovalRuleTemplate -> ApprovalRuleTemplate -> Bool
== :: ApprovalRuleTemplate -> ApprovalRuleTemplate -> Bool
$c== :: ApprovalRuleTemplate -> ApprovalRuleTemplate -> Bool
Prelude.Eq, ReadPrec [ApprovalRuleTemplate]
ReadPrec ApprovalRuleTemplate
Int -> ReadS ApprovalRuleTemplate
ReadS [ApprovalRuleTemplate]
(Int -> ReadS ApprovalRuleTemplate)
-> ReadS [ApprovalRuleTemplate]
-> ReadPrec ApprovalRuleTemplate
-> ReadPrec [ApprovalRuleTemplate]
-> Read ApprovalRuleTemplate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApprovalRuleTemplate]
$creadListPrec :: ReadPrec [ApprovalRuleTemplate]
readPrec :: ReadPrec ApprovalRuleTemplate
$creadPrec :: ReadPrec ApprovalRuleTemplate
readList :: ReadS [ApprovalRuleTemplate]
$creadList :: ReadS [ApprovalRuleTemplate]
readsPrec :: Int -> ReadS ApprovalRuleTemplate
$creadsPrec :: Int -> ReadS ApprovalRuleTemplate
Prelude.Read, Int -> ApprovalRuleTemplate -> ShowS
[ApprovalRuleTemplate] -> ShowS
ApprovalRuleTemplate -> String
(Int -> ApprovalRuleTemplate -> ShowS)
-> (ApprovalRuleTemplate -> String)
-> ([ApprovalRuleTemplate] -> ShowS)
-> Show ApprovalRuleTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApprovalRuleTemplate] -> ShowS
$cshowList :: [ApprovalRuleTemplate] -> ShowS
show :: ApprovalRuleTemplate -> String
$cshow :: ApprovalRuleTemplate -> String
showsPrec :: Int -> ApprovalRuleTemplate -> ShowS
$cshowsPrec :: Int -> ApprovalRuleTemplate -> ShowS
Prelude.Show, (forall x. ApprovalRuleTemplate -> Rep ApprovalRuleTemplate x)
-> (forall x. Rep ApprovalRuleTemplate x -> ApprovalRuleTemplate)
-> Generic ApprovalRuleTemplate
forall x. Rep ApprovalRuleTemplate x -> ApprovalRuleTemplate
forall x. ApprovalRuleTemplate -> Rep ApprovalRuleTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ApprovalRuleTemplate x -> ApprovalRuleTemplate
$cfrom :: forall x. ApprovalRuleTemplate -> Rep ApprovalRuleTemplate x
Prelude.Generic)

-- |
-- Create a value of 'ApprovalRuleTemplate' 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:
--
-- 'ruleContentSha256', 'approvalRuleTemplate_ruleContentSha256' - The SHA-256 hash signature for the content of the approval rule
-- template.
--
-- 'approvalRuleTemplateId', 'approvalRuleTemplate_approvalRuleTemplateId' - The system-generated ID of the approval rule template.
--
-- 'lastModifiedDate', 'approvalRuleTemplate_lastModifiedDate' - The date the approval rule template was most recently changed, in
-- timestamp format.
--
-- 'approvalRuleTemplateDescription', 'approvalRuleTemplate_approvalRuleTemplateDescription' - The description of the approval rule template.
--
-- 'approvalRuleTemplateContent', 'approvalRuleTemplate_approvalRuleTemplateContent' - The content of the approval rule template.
--
-- 'lastModifiedUser', 'approvalRuleTemplate_lastModifiedUser' - The Amazon Resource Name (ARN) of the user who made the most recent
-- changes to the approval rule template.
--
-- 'creationDate', 'approvalRuleTemplate_creationDate' - The date the approval rule template was created, in timestamp format.
--
-- 'approvalRuleTemplateName', 'approvalRuleTemplate_approvalRuleTemplateName' - The name of the approval rule template.
newApprovalRuleTemplate ::
  ApprovalRuleTemplate
newApprovalRuleTemplate :: ApprovalRuleTemplate
newApprovalRuleTemplate =
  ApprovalRuleTemplate' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ApprovalRuleTemplate
ApprovalRuleTemplate'
    { $sel:ruleContentSha256:ApprovalRuleTemplate' :: Maybe Text
ruleContentSha256 =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:approvalRuleTemplateId:ApprovalRuleTemplate' :: Maybe Text
approvalRuleTemplateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:ApprovalRuleTemplate' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:approvalRuleTemplateDescription:ApprovalRuleTemplate' :: Maybe Text
approvalRuleTemplateDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:approvalRuleTemplateContent:ApprovalRuleTemplate' :: Maybe Text
approvalRuleTemplateContent = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedUser:ApprovalRuleTemplate' :: Maybe Text
lastModifiedUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:ApprovalRuleTemplate' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:approvalRuleTemplateName:ApprovalRuleTemplate' :: Maybe Text
approvalRuleTemplateName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The SHA-256 hash signature for the content of the approval rule
-- template.
approvalRuleTemplate_ruleContentSha256 :: Lens.Lens' ApprovalRuleTemplate (Prelude.Maybe Prelude.Text)
approvalRuleTemplate_ruleContentSha256 :: (Maybe Text -> f (Maybe Text))
-> ApprovalRuleTemplate -> f ApprovalRuleTemplate
approvalRuleTemplate_ruleContentSha256 = (ApprovalRuleTemplate -> Maybe Text)
-> (ApprovalRuleTemplate -> Maybe Text -> ApprovalRuleTemplate)
-> Lens
     ApprovalRuleTemplate ApprovalRuleTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRuleTemplate' {Maybe Text
ruleContentSha256 :: Maybe Text
$sel:ruleContentSha256:ApprovalRuleTemplate' :: ApprovalRuleTemplate -> Maybe Text
ruleContentSha256} -> Maybe Text
ruleContentSha256) (\s :: ApprovalRuleTemplate
s@ApprovalRuleTemplate' {} Maybe Text
a -> ApprovalRuleTemplate
s {$sel:ruleContentSha256:ApprovalRuleTemplate' :: Maybe Text
ruleContentSha256 = Maybe Text
a} :: ApprovalRuleTemplate)

-- | The system-generated ID of the approval rule template.
approvalRuleTemplate_approvalRuleTemplateId :: Lens.Lens' ApprovalRuleTemplate (Prelude.Maybe Prelude.Text)
approvalRuleTemplate_approvalRuleTemplateId :: (Maybe Text -> f (Maybe Text))
-> ApprovalRuleTemplate -> f ApprovalRuleTemplate
approvalRuleTemplate_approvalRuleTemplateId = (ApprovalRuleTemplate -> Maybe Text)
-> (ApprovalRuleTemplate -> Maybe Text -> ApprovalRuleTemplate)
-> Lens
     ApprovalRuleTemplate ApprovalRuleTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRuleTemplate' {Maybe Text
approvalRuleTemplateId :: Maybe Text
$sel:approvalRuleTemplateId:ApprovalRuleTemplate' :: ApprovalRuleTemplate -> Maybe Text
approvalRuleTemplateId} -> Maybe Text
approvalRuleTemplateId) (\s :: ApprovalRuleTemplate
s@ApprovalRuleTemplate' {} Maybe Text
a -> ApprovalRuleTemplate
s {$sel:approvalRuleTemplateId:ApprovalRuleTemplate' :: Maybe Text
approvalRuleTemplateId = Maybe Text
a} :: ApprovalRuleTemplate)

-- | The date the approval rule template was most recently changed, in
-- timestamp format.
approvalRuleTemplate_lastModifiedDate :: Lens.Lens' ApprovalRuleTemplate (Prelude.Maybe Prelude.UTCTime)
approvalRuleTemplate_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ApprovalRuleTemplate -> f ApprovalRuleTemplate
approvalRuleTemplate_lastModifiedDate = (ApprovalRuleTemplate -> Maybe POSIX)
-> (ApprovalRuleTemplate -> Maybe POSIX -> ApprovalRuleTemplate)
-> Lens
     ApprovalRuleTemplate
     ApprovalRuleTemplate
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRuleTemplate' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:ApprovalRuleTemplate' :: ApprovalRuleTemplate -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: ApprovalRuleTemplate
s@ApprovalRuleTemplate' {} Maybe POSIX
a -> ApprovalRuleTemplate
s {$sel:lastModifiedDate:ApprovalRuleTemplate' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: ApprovalRuleTemplate) ((Maybe POSIX -> f (Maybe POSIX))
 -> ApprovalRuleTemplate -> f ApprovalRuleTemplate)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ApprovalRuleTemplate
-> f ApprovalRuleTemplate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The description of the approval rule template.
approvalRuleTemplate_approvalRuleTemplateDescription :: Lens.Lens' ApprovalRuleTemplate (Prelude.Maybe Prelude.Text)
approvalRuleTemplate_approvalRuleTemplateDescription :: (Maybe Text -> f (Maybe Text))
-> ApprovalRuleTemplate -> f ApprovalRuleTemplate
approvalRuleTemplate_approvalRuleTemplateDescription = (ApprovalRuleTemplate -> Maybe Text)
-> (ApprovalRuleTemplate -> Maybe Text -> ApprovalRuleTemplate)
-> Lens
     ApprovalRuleTemplate ApprovalRuleTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRuleTemplate' {Maybe Text
approvalRuleTemplateDescription :: Maybe Text
$sel:approvalRuleTemplateDescription:ApprovalRuleTemplate' :: ApprovalRuleTemplate -> Maybe Text
approvalRuleTemplateDescription} -> Maybe Text
approvalRuleTemplateDescription) (\s :: ApprovalRuleTemplate
s@ApprovalRuleTemplate' {} Maybe Text
a -> ApprovalRuleTemplate
s {$sel:approvalRuleTemplateDescription:ApprovalRuleTemplate' :: Maybe Text
approvalRuleTemplateDescription = Maybe Text
a} :: ApprovalRuleTemplate)

-- | The content of the approval rule template.
approvalRuleTemplate_approvalRuleTemplateContent :: Lens.Lens' ApprovalRuleTemplate (Prelude.Maybe Prelude.Text)
approvalRuleTemplate_approvalRuleTemplateContent :: (Maybe Text -> f (Maybe Text))
-> ApprovalRuleTemplate -> f ApprovalRuleTemplate
approvalRuleTemplate_approvalRuleTemplateContent = (ApprovalRuleTemplate -> Maybe Text)
-> (ApprovalRuleTemplate -> Maybe Text -> ApprovalRuleTemplate)
-> Lens
     ApprovalRuleTemplate ApprovalRuleTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRuleTemplate' {Maybe Text
approvalRuleTemplateContent :: Maybe Text
$sel:approvalRuleTemplateContent:ApprovalRuleTemplate' :: ApprovalRuleTemplate -> Maybe Text
approvalRuleTemplateContent} -> Maybe Text
approvalRuleTemplateContent) (\s :: ApprovalRuleTemplate
s@ApprovalRuleTemplate' {} Maybe Text
a -> ApprovalRuleTemplate
s {$sel:approvalRuleTemplateContent:ApprovalRuleTemplate' :: Maybe Text
approvalRuleTemplateContent = Maybe Text
a} :: ApprovalRuleTemplate)

-- | The Amazon Resource Name (ARN) of the user who made the most recent
-- changes to the approval rule template.
approvalRuleTemplate_lastModifiedUser :: Lens.Lens' ApprovalRuleTemplate (Prelude.Maybe Prelude.Text)
approvalRuleTemplate_lastModifiedUser :: (Maybe Text -> f (Maybe Text))
-> ApprovalRuleTemplate -> f ApprovalRuleTemplate
approvalRuleTemplate_lastModifiedUser = (ApprovalRuleTemplate -> Maybe Text)
-> (ApprovalRuleTemplate -> Maybe Text -> ApprovalRuleTemplate)
-> Lens
     ApprovalRuleTemplate ApprovalRuleTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRuleTemplate' {Maybe Text
lastModifiedUser :: Maybe Text
$sel:lastModifiedUser:ApprovalRuleTemplate' :: ApprovalRuleTemplate -> Maybe Text
lastModifiedUser} -> Maybe Text
lastModifiedUser) (\s :: ApprovalRuleTemplate
s@ApprovalRuleTemplate' {} Maybe Text
a -> ApprovalRuleTemplate
s {$sel:lastModifiedUser:ApprovalRuleTemplate' :: Maybe Text
lastModifiedUser = Maybe Text
a} :: ApprovalRuleTemplate)

-- | The date the approval rule template was created, in timestamp format.
approvalRuleTemplate_creationDate :: Lens.Lens' ApprovalRuleTemplate (Prelude.Maybe Prelude.UTCTime)
approvalRuleTemplate_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ApprovalRuleTemplate -> f ApprovalRuleTemplate
approvalRuleTemplate_creationDate = (ApprovalRuleTemplate -> Maybe POSIX)
-> (ApprovalRuleTemplate -> Maybe POSIX -> ApprovalRuleTemplate)
-> Lens
     ApprovalRuleTemplate
     ApprovalRuleTemplate
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRuleTemplate' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:ApprovalRuleTemplate' :: ApprovalRuleTemplate -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: ApprovalRuleTemplate
s@ApprovalRuleTemplate' {} Maybe POSIX
a -> ApprovalRuleTemplate
s {$sel:creationDate:ApprovalRuleTemplate' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: ApprovalRuleTemplate) ((Maybe POSIX -> f (Maybe POSIX))
 -> ApprovalRuleTemplate -> f ApprovalRuleTemplate)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ApprovalRuleTemplate
-> f ApprovalRuleTemplate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the approval rule template.
approvalRuleTemplate_approvalRuleTemplateName :: Lens.Lens' ApprovalRuleTemplate (Prelude.Maybe Prelude.Text)
approvalRuleTemplate_approvalRuleTemplateName :: (Maybe Text -> f (Maybe Text))
-> ApprovalRuleTemplate -> f ApprovalRuleTemplate
approvalRuleTemplate_approvalRuleTemplateName = (ApprovalRuleTemplate -> Maybe Text)
-> (ApprovalRuleTemplate -> Maybe Text -> ApprovalRuleTemplate)
-> Lens
     ApprovalRuleTemplate ApprovalRuleTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRuleTemplate' {Maybe Text
approvalRuleTemplateName :: Maybe Text
$sel:approvalRuleTemplateName:ApprovalRuleTemplate' :: ApprovalRuleTemplate -> Maybe Text
approvalRuleTemplateName} -> Maybe Text
approvalRuleTemplateName) (\s :: ApprovalRuleTemplate
s@ApprovalRuleTemplate' {} Maybe Text
a -> ApprovalRuleTemplate
s {$sel:approvalRuleTemplateName:ApprovalRuleTemplate' :: Maybe Text
approvalRuleTemplateName = Maybe Text
a} :: ApprovalRuleTemplate)

instance Core.FromJSON ApprovalRuleTemplate where
  parseJSON :: Value -> Parser ApprovalRuleTemplate
parseJSON =
    String
-> (Object -> Parser ApprovalRuleTemplate)
-> Value
-> Parser ApprovalRuleTemplate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ApprovalRuleTemplate"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ApprovalRuleTemplate
ApprovalRuleTemplate'
            (Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> ApprovalRuleTemplate)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> ApprovalRuleTemplate)
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
"ruleContentSha256")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> ApprovalRuleTemplate)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> ApprovalRuleTemplate)
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
"approvalRuleTemplateId")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> ApprovalRuleTemplate)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> ApprovalRuleTemplate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastModifiedDate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> ApprovalRuleTemplate)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe POSIX -> Maybe Text -> ApprovalRuleTemplate)
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
"approvalRuleTemplateDescription")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe POSIX -> Maybe Text -> ApprovalRuleTemplate)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe POSIX -> Maybe Text -> ApprovalRuleTemplate)
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
"approvalRuleTemplateContent")
            Parser
  (Maybe Text -> Maybe POSIX -> Maybe Text -> ApprovalRuleTemplate)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> ApprovalRuleTemplate)
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
"lastModifiedUser")
            Parser (Maybe POSIX -> Maybe Text -> ApprovalRuleTemplate)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> ApprovalRuleTemplate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationDate")
            Parser (Maybe Text -> ApprovalRuleTemplate)
-> Parser (Maybe Text) -> Parser ApprovalRuleTemplate
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
"approvalRuleTemplateName")
      )

instance Prelude.Hashable ApprovalRuleTemplate

instance Prelude.NFData ApprovalRuleTemplate