{-# 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.ApprovalRule
-- 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.ApprovalRule where

import Amazonka.CodeCommit.Types.OriginApprovalRuleTemplate
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

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

-- |
-- Create a value of 'ApprovalRule' 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', 'approvalRule_ruleContentSha256' - The SHA-256 hash signature for the content of the approval rule.
--
-- 'lastModifiedDate', 'approvalRule_lastModifiedDate' - The date the approval rule was most recently changed, in timestamp
-- format.
--
-- 'approvalRuleName', 'approvalRule_approvalRuleName' - The name of the approval rule.
--
-- 'approvalRuleId', 'approvalRule_approvalRuleId' - The system-generated ID of the approval rule.
--
-- 'lastModifiedUser', 'approvalRule_lastModifiedUser' - The Amazon Resource Name (ARN) of the user who made the most recent
-- changes to the approval rule.
--
-- 'originApprovalRuleTemplate', 'approvalRule_originApprovalRuleTemplate' - The approval rule template used to create the rule.
--
-- 'creationDate', 'approvalRule_creationDate' - The date the approval rule was created, in timestamp format.
--
-- 'approvalRuleContent', 'approvalRule_approvalRuleContent' - The content of the approval rule.
newApprovalRule ::
  ApprovalRule
newApprovalRule :: ApprovalRule
newApprovalRule =
  ApprovalRule' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OriginApprovalRuleTemplate
-> Maybe POSIX
-> Maybe Text
-> ApprovalRule
ApprovalRule'
    { $sel:ruleContentSha256:ApprovalRule' :: Maybe Text
ruleContentSha256 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:ApprovalRule' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:approvalRuleName:ApprovalRule' :: Maybe Text
approvalRuleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:approvalRuleId:ApprovalRule' :: Maybe Text
approvalRuleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedUser:ApprovalRule' :: Maybe Text
lastModifiedUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:originApprovalRuleTemplate:ApprovalRule' :: Maybe OriginApprovalRuleTemplate
originApprovalRuleTemplate = Maybe OriginApprovalRuleTemplate
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:ApprovalRule' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:approvalRuleContent:ApprovalRule' :: Maybe Text
approvalRuleContent = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The date the approval rule was most recently changed, in timestamp
-- format.
approvalRule_lastModifiedDate :: Lens.Lens' ApprovalRule (Prelude.Maybe Prelude.UTCTime)
approvalRule_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ApprovalRule -> f ApprovalRule
approvalRule_lastModifiedDate = (ApprovalRule -> Maybe POSIX)
-> (ApprovalRule -> Maybe POSIX -> ApprovalRule)
-> Lens ApprovalRule ApprovalRule (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRule' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:ApprovalRule' :: ApprovalRule -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: ApprovalRule
s@ApprovalRule' {} Maybe POSIX
a -> ApprovalRule
s {$sel:lastModifiedDate:ApprovalRule' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: ApprovalRule) ((Maybe POSIX -> f (Maybe POSIX))
 -> ApprovalRule -> f ApprovalRule)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ApprovalRule
-> f ApprovalRule
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.
approvalRule_approvalRuleName :: Lens.Lens' ApprovalRule (Prelude.Maybe Prelude.Text)
approvalRule_approvalRuleName :: (Maybe Text -> f (Maybe Text)) -> ApprovalRule -> f ApprovalRule
approvalRule_approvalRuleName = (ApprovalRule -> Maybe Text)
-> (ApprovalRule -> Maybe Text -> ApprovalRule)
-> Lens ApprovalRule ApprovalRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRule' {Maybe Text
approvalRuleName :: Maybe Text
$sel:approvalRuleName:ApprovalRule' :: ApprovalRule -> Maybe Text
approvalRuleName} -> Maybe Text
approvalRuleName) (\s :: ApprovalRule
s@ApprovalRule' {} Maybe Text
a -> ApprovalRule
s {$sel:approvalRuleName:ApprovalRule' :: Maybe Text
approvalRuleName = Maybe Text
a} :: ApprovalRule)

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

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

-- | The approval rule template used to create the rule.
approvalRule_originApprovalRuleTemplate :: Lens.Lens' ApprovalRule (Prelude.Maybe OriginApprovalRuleTemplate)
approvalRule_originApprovalRuleTemplate :: (Maybe OriginApprovalRuleTemplate
 -> f (Maybe OriginApprovalRuleTemplate))
-> ApprovalRule -> f ApprovalRule
approvalRule_originApprovalRuleTemplate = (ApprovalRule -> Maybe OriginApprovalRuleTemplate)
-> (ApprovalRule
    -> Maybe OriginApprovalRuleTemplate -> ApprovalRule)
-> Lens
     ApprovalRule
     ApprovalRule
     (Maybe OriginApprovalRuleTemplate)
     (Maybe OriginApprovalRuleTemplate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRule' {Maybe OriginApprovalRuleTemplate
originApprovalRuleTemplate :: Maybe OriginApprovalRuleTemplate
$sel:originApprovalRuleTemplate:ApprovalRule' :: ApprovalRule -> Maybe OriginApprovalRuleTemplate
originApprovalRuleTemplate} -> Maybe OriginApprovalRuleTemplate
originApprovalRuleTemplate) (\s :: ApprovalRule
s@ApprovalRule' {} Maybe OriginApprovalRuleTemplate
a -> ApprovalRule
s {$sel:originApprovalRuleTemplate:ApprovalRule' :: Maybe OriginApprovalRuleTemplate
originApprovalRuleTemplate = Maybe OriginApprovalRuleTemplate
a} :: ApprovalRule)

-- | The date the approval rule was created, in timestamp format.
approvalRule_creationDate :: Lens.Lens' ApprovalRule (Prelude.Maybe Prelude.UTCTime)
approvalRule_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ApprovalRule -> f ApprovalRule
approvalRule_creationDate = (ApprovalRule -> Maybe POSIX)
-> (ApprovalRule -> Maybe POSIX -> ApprovalRule)
-> Lens ApprovalRule ApprovalRule (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRule' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:ApprovalRule' :: ApprovalRule -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: ApprovalRule
s@ApprovalRule' {} Maybe POSIX
a -> ApprovalRule
s {$sel:creationDate:ApprovalRule' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: ApprovalRule) ((Maybe POSIX -> f (Maybe POSIX))
 -> ApprovalRule -> f ApprovalRule)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ApprovalRule
-> f ApprovalRule
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 content of the approval rule.
approvalRule_approvalRuleContent :: Lens.Lens' ApprovalRule (Prelude.Maybe Prelude.Text)
approvalRule_approvalRuleContent :: (Maybe Text -> f (Maybe Text)) -> ApprovalRule -> f ApprovalRule
approvalRule_approvalRuleContent = (ApprovalRule -> Maybe Text)
-> (ApprovalRule -> Maybe Text -> ApprovalRule)
-> Lens ApprovalRule ApprovalRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApprovalRule' {Maybe Text
approvalRuleContent :: Maybe Text
$sel:approvalRuleContent:ApprovalRule' :: ApprovalRule -> Maybe Text
approvalRuleContent} -> Maybe Text
approvalRuleContent) (\s :: ApprovalRule
s@ApprovalRule' {} Maybe Text
a -> ApprovalRule
s {$sel:approvalRuleContent:ApprovalRule' :: Maybe Text
approvalRuleContent = Maybe Text
a} :: ApprovalRule)

instance Core.FromJSON ApprovalRule where
  parseJSON :: Value -> Parser ApprovalRule
parseJSON =
    String
-> (Object -> Parser ApprovalRule) -> Value -> Parser ApprovalRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ApprovalRule"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OriginApprovalRuleTemplate
-> Maybe POSIX
-> Maybe Text
-> ApprovalRule
ApprovalRule'
            (Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe OriginApprovalRuleTemplate
 -> Maybe POSIX
 -> Maybe Text
 -> ApprovalRule)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe OriginApprovalRuleTemplate
      -> Maybe POSIX
      -> Maybe Text
      -> ApprovalRule)
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 POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe OriginApprovalRuleTemplate
   -> Maybe POSIX
   -> Maybe Text
   -> ApprovalRule)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe OriginApprovalRuleTemplate
      -> Maybe POSIX
      -> Maybe Text
      -> ApprovalRule)
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 OriginApprovalRuleTemplate
   -> Maybe POSIX
   -> Maybe Text
   -> ApprovalRule)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe OriginApprovalRuleTemplate
      -> Maybe POSIX
      -> Maybe Text
      -> ApprovalRule)
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
"approvalRuleName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe OriginApprovalRuleTemplate
   -> Maybe POSIX
   -> Maybe Text
   -> ApprovalRule)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe OriginApprovalRuleTemplate
      -> Maybe POSIX
      -> Maybe Text
      -> ApprovalRule)
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
"approvalRuleId")
            Parser
  (Maybe Text
   -> Maybe OriginApprovalRuleTemplate
   -> Maybe POSIX
   -> Maybe Text
   -> ApprovalRule)
-> Parser (Maybe Text)
-> Parser
     (Maybe OriginApprovalRuleTemplate
      -> Maybe POSIX -> Maybe Text -> ApprovalRule)
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 OriginApprovalRuleTemplate
   -> Maybe POSIX -> Maybe Text -> ApprovalRule)
-> Parser (Maybe OriginApprovalRuleTemplate)
-> Parser (Maybe POSIX -> Maybe Text -> ApprovalRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OriginApprovalRuleTemplate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"originApprovalRuleTemplate")
            Parser (Maybe POSIX -> Maybe Text -> ApprovalRule)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> ApprovalRule)
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 -> ApprovalRule)
-> Parser (Maybe Text) -> Parser ApprovalRule
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
"approvalRuleContent")
      )

instance Prelude.Hashable ApprovalRule

instance Prelude.NFData ApprovalRule