{-# 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.StepFunctions.Types.HistoryEventExecutionDataDetails
-- 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.StepFunctions.Types.HistoryEventExecutionDataDetails where

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

-- | Provides details about input or output in an execution history event.
--
-- /See:/ 'newHistoryEventExecutionDataDetails' smart constructor.
data HistoryEventExecutionDataDetails = HistoryEventExecutionDataDetails'
  { -- | Indicates whether input or output was truncated in the response. Always
    -- @false@ for API calls.
    HistoryEventExecutionDataDetails -> Maybe Bool
truncated :: Prelude.Maybe Prelude.Bool
  }
  deriving (HistoryEventExecutionDataDetails
-> HistoryEventExecutionDataDetails -> Bool
(HistoryEventExecutionDataDetails
 -> HistoryEventExecutionDataDetails -> Bool)
-> (HistoryEventExecutionDataDetails
    -> HistoryEventExecutionDataDetails -> Bool)
-> Eq HistoryEventExecutionDataDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HistoryEventExecutionDataDetails
-> HistoryEventExecutionDataDetails -> Bool
$c/= :: HistoryEventExecutionDataDetails
-> HistoryEventExecutionDataDetails -> Bool
== :: HistoryEventExecutionDataDetails
-> HistoryEventExecutionDataDetails -> Bool
$c== :: HistoryEventExecutionDataDetails
-> HistoryEventExecutionDataDetails -> Bool
Prelude.Eq, ReadPrec [HistoryEventExecutionDataDetails]
ReadPrec HistoryEventExecutionDataDetails
Int -> ReadS HistoryEventExecutionDataDetails
ReadS [HistoryEventExecutionDataDetails]
(Int -> ReadS HistoryEventExecutionDataDetails)
-> ReadS [HistoryEventExecutionDataDetails]
-> ReadPrec HistoryEventExecutionDataDetails
-> ReadPrec [HistoryEventExecutionDataDetails]
-> Read HistoryEventExecutionDataDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HistoryEventExecutionDataDetails]
$creadListPrec :: ReadPrec [HistoryEventExecutionDataDetails]
readPrec :: ReadPrec HistoryEventExecutionDataDetails
$creadPrec :: ReadPrec HistoryEventExecutionDataDetails
readList :: ReadS [HistoryEventExecutionDataDetails]
$creadList :: ReadS [HistoryEventExecutionDataDetails]
readsPrec :: Int -> ReadS HistoryEventExecutionDataDetails
$creadsPrec :: Int -> ReadS HistoryEventExecutionDataDetails
Prelude.Read, Int -> HistoryEventExecutionDataDetails -> ShowS
[HistoryEventExecutionDataDetails] -> ShowS
HistoryEventExecutionDataDetails -> String
(Int -> HistoryEventExecutionDataDetails -> ShowS)
-> (HistoryEventExecutionDataDetails -> String)
-> ([HistoryEventExecutionDataDetails] -> ShowS)
-> Show HistoryEventExecutionDataDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HistoryEventExecutionDataDetails] -> ShowS
$cshowList :: [HistoryEventExecutionDataDetails] -> ShowS
show :: HistoryEventExecutionDataDetails -> String
$cshow :: HistoryEventExecutionDataDetails -> String
showsPrec :: Int -> HistoryEventExecutionDataDetails -> ShowS
$cshowsPrec :: Int -> HistoryEventExecutionDataDetails -> ShowS
Prelude.Show, (forall x.
 HistoryEventExecutionDataDetails
 -> Rep HistoryEventExecutionDataDetails x)
-> (forall x.
    Rep HistoryEventExecutionDataDetails x
    -> HistoryEventExecutionDataDetails)
-> Generic HistoryEventExecutionDataDetails
forall x.
Rep HistoryEventExecutionDataDetails x
-> HistoryEventExecutionDataDetails
forall x.
HistoryEventExecutionDataDetails
-> Rep HistoryEventExecutionDataDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HistoryEventExecutionDataDetails x
-> HistoryEventExecutionDataDetails
$cfrom :: forall x.
HistoryEventExecutionDataDetails
-> Rep HistoryEventExecutionDataDetails x
Prelude.Generic)

-- |
-- Create a value of 'HistoryEventExecutionDataDetails' 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:
--
-- 'truncated', 'historyEventExecutionDataDetails_truncated' - Indicates whether input or output was truncated in the response. Always
-- @false@ for API calls.
newHistoryEventExecutionDataDetails ::
  HistoryEventExecutionDataDetails
newHistoryEventExecutionDataDetails :: HistoryEventExecutionDataDetails
newHistoryEventExecutionDataDetails =
  HistoryEventExecutionDataDetails' :: Maybe Bool -> HistoryEventExecutionDataDetails
HistoryEventExecutionDataDetails'
    { $sel:truncated:HistoryEventExecutionDataDetails' :: Maybe Bool
truncated =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | Indicates whether input or output was truncated in the response. Always
-- @false@ for API calls.
historyEventExecutionDataDetails_truncated :: Lens.Lens' HistoryEventExecutionDataDetails (Prelude.Maybe Prelude.Bool)
historyEventExecutionDataDetails_truncated :: (Maybe Bool -> f (Maybe Bool))
-> HistoryEventExecutionDataDetails
-> f HistoryEventExecutionDataDetails
historyEventExecutionDataDetails_truncated = (HistoryEventExecutionDataDetails -> Maybe Bool)
-> (HistoryEventExecutionDataDetails
    -> Maybe Bool -> HistoryEventExecutionDataDetails)
-> Lens
     HistoryEventExecutionDataDetails
     HistoryEventExecutionDataDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HistoryEventExecutionDataDetails' {Maybe Bool
truncated :: Maybe Bool
$sel:truncated:HistoryEventExecutionDataDetails' :: HistoryEventExecutionDataDetails -> Maybe Bool
truncated} -> Maybe Bool
truncated) (\s :: HistoryEventExecutionDataDetails
s@HistoryEventExecutionDataDetails' {} Maybe Bool
a -> HistoryEventExecutionDataDetails
s {$sel:truncated:HistoryEventExecutionDataDetails' :: Maybe Bool
truncated = Maybe Bool
a} :: HistoryEventExecutionDataDetails)

instance
  Core.FromJSON
    HistoryEventExecutionDataDetails
  where
  parseJSON :: Value -> Parser HistoryEventExecutionDataDetails
parseJSON =
    String
-> (Object -> Parser HistoryEventExecutionDataDetails)
-> Value
-> Parser HistoryEventExecutionDataDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"HistoryEventExecutionDataDetails"
      ( \Object
x ->
          Maybe Bool -> HistoryEventExecutionDataDetails
HistoryEventExecutionDataDetails'
            (Maybe Bool -> HistoryEventExecutionDataDetails)
-> Parser (Maybe Bool) -> Parser HistoryEventExecutionDataDetails
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"truncated")
      )

instance
  Prelude.Hashable
    HistoryEventExecutionDataDetails

instance
  Prelude.NFData
    HistoryEventExecutionDataDetails