{-# 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.Pinpoint.Types.ContactCenterActivity
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Pinpoint.Types.ContactCenterActivity where

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

-- | /See:/ 'newContactCenterActivity' smart constructor.
data ContactCenterActivity = ContactCenterActivity'
  { -- | The unique identifier for the next activity to perform after the this
    -- activity.
    ContactCenterActivity -> Maybe Text
nextActivity :: Prelude.Maybe Prelude.Text
  }
  deriving (ContactCenterActivity -> ContactCenterActivity -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContactCenterActivity -> ContactCenterActivity -> Bool
$c/= :: ContactCenterActivity -> ContactCenterActivity -> Bool
== :: ContactCenterActivity -> ContactCenterActivity -> Bool
$c== :: ContactCenterActivity -> ContactCenterActivity -> Bool
Prelude.Eq, ReadPrec [ContactCenterActivity]
ReadPrec ContactCenterActivity
Int -> ReadS ContactCenterActivity
ReadS [ContactCenterActivity]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContactCenterActivity]
$creadListPrec :: ReadPrec [ContactCenterActivity]
readPrec :: ReadPrec ContactCenterActivity
$creadPrec :: ReadPrec ContactCenterActivity
readList :: ReadS [ContactCenterActivity]
$creadList :: ReadS [ContactCenterActivity]
readsPrec :: Int -> ReadS ContactCenterActivity
$creadsPrec :: Int -> ReadS ContactCenterActivity
Prelude.Read, Int -> ContactCenterActivity -> ShowS
[ContactCenterActivity] -> ShowS
ContactCenterActivity -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContactCenterActivity] -> ShowS
$cshowList :: [ContactCenterActivity] -> ShowS
show :: ContactCenterActivity -> String
$cshow :: ContactCenterActivity -> String
showsPrec :: Int -> ContactCenterActivity -> ShowS
$cshowsPrec :: Int -> ContactCenterActivity -> ShowS
Prelude.Show, forall x. Rep ContactCenterActivity x -> ContactCenterActivity
forall x. ContactCenterActivity -> Rep ContactCenterActivity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContactCenterActivity x -> ContactCenterActivity
$cfrom :: forall x. ContactCenterActivity -> Rep ContactCenterActivity x
Prelude.Generic)

-- |
-- Create a value of 'ContactCenterActivity' 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:
--
-- 'nextActivity', 'contactCenterActivity_nextActivity' - The unique identifier for the next activity to perform after the this
-- activity.
newContactCenterActivity ::
  ContactCenterActivity
newContactCenterActivity :: ContactCenterActivity
newContactCenterActivity =
  ContactCenterActivity'
    { $sel:nextActivity:ContactCenterActivity' :: Maybe Text
nextActivity =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The unique identifier for the next activity to perform after the this
-- activity.
contactCenterActivity_nextActivity :: Lens.Lens' ContactCenterActivity (Prelude.Maybe Prelude.Text)
contactCenterActivity_nextActivity :: Lens' ContactCenterActivity (Maybe Text)
contactCenterActivity_nextActivity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactCenterActivity' {Maybe Text
nextActivity :: Maybe Text
$sel:nextActivity:ContactCenterActivity' :: ContactCenterActivity -> Maybe Text
nextActivity} -> Maybe Text
nextActivity) (\s :: ContactCenterActivity
s@ContactCenterActivity' {} Maybe Text
a -> ContactCenterActivity
s {$sel:nextActivity:ContactCenterActivity' :: Maybe Text
nextActivity = Maybe Text
a} :: ContactCenterActivity)

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

instance Prelude.Hashable ContactCenterActivity where
  hashWithSalt :: Int -> ContactCenterActivity -> Int
hashWithSalt Int
_salt ContactCenterActivity' {Maybe Text
nextActivity :: Maybe Text
$sel:nextActivity:ContactCenterActivity' :: ContactCenterActivity -> Maybe Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextActivity

instance Prelude.NFData ContactCenterActivity where
  rnf :: ContactCenterActivity -> ()
rnf ContactCenterActivity' {Maybe Text
nextActivity :: Maybe Text
$sel:nextActivity:ContactCenterActivity' :: ContactCenterActivity -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextActivity

instance Data.ToJSON ContactCenterActivity where
  toJSON :: ContactCenterActivity -> Value
toJSON ContactCenterActivity' {Maybe Text
nextActivity :: Maybe Text
$sel:nextActivity:ContactCenterActivity' :: ContactCenterActivity -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Key
"NextActivity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextActivity]
      )