{-# 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 #-}
module Amazonka.ConnectContactLens.Types.CategoryDetails where
import Amazonka.ConnectContactLens.Types.PointOfInterest
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
data CategoryDetails = CategoryDetails'
{
CategoryDetails -> [PointOfInterest]
pointsOfInterest :: [PointOfInterest]
}
deriving (CategoryDetails -> CategoryDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CategoryDetails -> CategoryDetails -> Bool
$c/= :: CategoryDetails -> CategoryDetails -> Bool
== :: CategoryDetails -> CategoryDetails -> Bool
$c== :: CategoryDetails -> CategoryDetails -> Bool
Prelude.Eq, ReadPrec [CategoryDetails]
ReadPrec CategoryDetails
Int -> ReadS CategoryDetails
ReadS [CategoryDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CategoryDetails]
$creadListPrec :: ReadPrec [CategoryDetails]
readPrec :: ReadPrec CategoryDetails
$creadPrec :: ReadPrec CategoryDetails
readList :: ReadS [CategoryDetails]
$creadList :: ReadS [CategoryDetails]
readsPrec :: Int -> ReadS CategoryDetails
$creadsPrec :: Int -> ReadS CategoryDetails
Prelude.Read, Int -> CategoryDetails -> ShowS
[CategoryDetails] -> ShowS
CategoryDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CategoryDetails] -> ShowS
$cshowList :: [CategoryDetails] -> ShowS
show :: CategoryDetails -> String
$cshow :: CategoryDetails -> String
showsPrec :: Int -> CategoryDetails -> ShowS
$cshowsPrec :: Int -> CategoryDetails -> ShowS
Prelude.Show, forall x. Rep CategoryDetails x -> CategoryDetails
forall x. CategoryDetails -> Rep CategoryDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CategoryDetails x -> CategoryDetails
$cfrom :: forall x. CategoryDetails -> Rep CategoryDetails x
Prelude.Generic)
newCategoryDetails ::
CategoryDetails
newCategoryDetails :: CategoryDetails
newCategoryDetails =
CategoryDetails' {$sel:pointsOfInterest:CategoryDetails' :: [PointOfInterest]
pointsOfInterest = forall a. Monoid a => a
Prelude.mempty}
categoryDetails_pointsOfInterest :: Lens.Lens' CategoryDetails [PointOfInterest]
categoryDetails_pointsOfInterest :: Lens' CategoryDetails [PointOfInterest]
categoryDetails_pointsOfInterest = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CategoryDetails' {[PointOfInterest]
pointsOfInterest :: [PointOfInterest]
$sel:pointsOfInterest:CategoryDetails' :: CategoryDetails -> [PointOfInterest]
pointsOfInterest} -> [PointOfInterest]
pointsOfInterest) (\s :: CategoryDetails
s@CategoryDetails' {} [PointOfInterest]
a -> CategoryDetails
s {$sel:pointsOfInterest:CategoryDetails' :: [PointOfInterest]
pointsOfInterest = [PointOfInterest]
a} :: CategoryDetails) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON CategoryDetails where
parseJSON :: Value -> Parser CategoryDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CategoryDetails"
( \Object
x ->
[PointOfInterest] -> CategoryDetails
CategoryDetails'
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
"PointsOfInterest"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable CategoryDetails where
hashWithSalt :: Int -> CategoryDetails -> Int
hashWithSalt Int
_salt CategoryDetails' {[PointOfInterest]
pointsOfInterest :: [PointOfInterest]
$sel:pointsOfInterest:CategoryDetails' :: CategoryDetails -> [PointOfInterest]
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [PointOfInterest]
pointsOfInterest
instance Prelude.NFData CategoryDetails where
rnf :: CategoryDetails -> ()
rnf CategoryDetails' {[PointOfInterest]
pointsOfInterest :: [PointOfInterest]
$sel:pointsOfInterest:CategoryDetails' :: CategoryDetails -> [PointOfInterest]
..} =
forall a. NFData a => a -> ()
Prelude.rnf [PointOfInterest]
pointsOfInterest