{-# 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.Connect.Types.HoursOfOperationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data HoursOfOperationSummary = HoursOfOperationSummary'
{
HoursOfOperationSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
HoursOfOperationSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
HoursOfOperationSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (HoursOfOperationSummary -> HoursOfOperationSummary -> Bool
(HoursOfOperationSummary -> HoursOfOperationSummary -> Bool)
-> (HoursOfOperationSummary -> HoursOfOperationSummary -> Bool)
-> Eq HoursOfOperationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HoursOfOperationSummary -> HoursOfOperationSummary -> Bool
$c/= :: HoursOfOperationSummary -> HoursOfOperationSummary -> Bool
== :: HoursOfOperationSummary -> HoursOfOperationSummary -> Bool
$c== :: HoursOfOperationSummary -> HoursOfOperationSummary -> Bool
Prelude.Eq, ReadPrec [HoursOfOperationSummary]
ReadPrec HoursOfOperationSummary
Int -> ReadS HoursOfOperationSummary
ReadS [HoursOfOperationSummary]
(Int -> ReadS HoursOfOperationSummary)
-> ReadS [HoursOfOperationSummary]
-> ReadPrec HoursOfOperationSummary
-> ReadPrec [HoursOfOperationSummary]
-> Read HoursOfOperationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HoursOfOperationSummary]
$creadListPrec :: ReadPrec [HoursOfOperationSummary]
readPrec :: ReadPrec HoursOfOperationSummary
$creadPrec :: ReadPrec HoursOfOperationSummary
readList :: ReadS [HoursOfOperationSummary]
$creadList :: ReadS [HoursOfOperationSummary]
readsPrec :: Int -> ReadS HoursOfOperationSummary
$creadsPrec :: Int -> ReadS HoursOfOperationSummary
Prelude.Read, Int -> HoursOfOperationSummary -> ShowS
[HoursOfOperationSummary] -> ShowS
HoursOfOperationSummary -> String
(Int -> HoursOfOperationSummary -> ShowS)
-> (HoursOfOperationSummary -> String)
-> ([HoursOfOperationSummary] -> ShowS)
-> Show HoursOfOperationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HoursOfOperationSummary] -> ShowS
$cshowList :: [HoursOfOperationSummary] -> ShowS
show :: HoursOfOperationSummary -> String
$cshow :: HoursOfOperationSummary -> String
showsPrec :: Int -> HoursOfOperationSummary -> ShowS
$cshowsPrec :: Int -> HoursOfOperationSummary -> ShowS
Prelude.Show, (forall x.
HoursOfOperationSummary -> Rep HoursOfOperationSummary x)
-> (forall x.
Rep HoursOfOperationSummary x -> HoursOfOperationSummary)
-> Generic HoursOfOperationSummary
forall x. Rep HoursOfOperationSummary x -> HoursOfOperationSummary
forall x. HoursOfOperationSummary -> Rep HoursOfOperationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HoursOfOperationSummary x -> HoursOfOperationSummary
$cfrom :: forall x. HoursOfOperationSummary -> Rep HoursOfOperationSummary x
Prelude.Generic)
newHoursOfOperationSummary ::
HoursOfOperationSummary
newHoursOfOperationSummary :: HoursOfOperationSummary
newHoursOfOperationSummary =
HoursOfOperationSummary' :: Maybe Text -> Maybe Text -> Maybe Text -> HoursOfOperationSummary
HoursOfOperationSummary'
{ $sel:arn:HoursOfOperationSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:HoursOfOperationSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:HoursOfOperationSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
hoursOfOperationSummary_arn :: Lens.Lens' HoursOfOperationSummary (Prelude.Maybe Prelude.Text)
hoursOfOperationSummary_arn :: (Maybe Text -> f (Maybe Text))
-> HoursOfOperationSummary -> f HoursOfOperationSummary
hoursOfOperationSummary_arn = (HoursOfOperationSummary -> Maybe Text)
-> (HoursOfOperationSummary
-> Maybe Text -> HoursOfOperationSummary)
-> Lens
HoursOfOperationSummary
HoursOfOperationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HoursOfOperationSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:HoursOfOperationSummary' :: HoursOfOperationSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: HoursOfOperationSummary
s@HoursOfOperationSummary' {} Maybe Text
a -> HoursOfOperationSummary
s {$sel:arn:HoursOfOperationSummary' :: Maybe Text
arn = Maybe Text
a} :: HoursOfOperationSummary)
hoursOfOperationSummary_name :: Lens.Lens' HoursOfOperationSummary (Prelude.Maybe Prelude.Text)
hoursOfOperationSummary_name :: (Maybe Text -> f (Maybe Text))
-> HoursOfOperationSummary -> f HoursOfOperationSummary
hoursOfOperationSummary_name = (HoursOfOperationSummary -> Maybe Text)
-> (HoursOfOperationSummary
-> Maybe Text -> HoursOfOperationSummary)
-> Lens
HoursOfOperationSummary
HoursOfOperationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HoursOfOperationSummary' {Maybe Text
name :: Maybe Text
$sel:name:HoursOfOperationSummary' :: HoursOfOperationSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: HoursOfOperationSummary
s@HoursOfOperationSummary' {} Maybe Text
a -> HoursOfOperationSummary
s {$sel:name:HoursOfOperationSummary' :: Maybe Text
name = Maybe Text
a} :: HoursOfOperationSummary)
hoursOfOperationSummary_id :: Lens.Lens' HoursOfOperationSummary (Prelude.Maybe Prelude.Text)
hoursOfOperationSummary_id :: (Maybe Text -> f (Maybe Text))
-> HoursOfOperationSummary -> f HoursOfOperationSummary
hoursOfOperationSummary_id = (HoursOfOperationSummary -> Maybe Text)
-> (HoursOfOperationSummary
-> Maybe Text -> HoursOfOperationSummary)
-> Lens
HoursOfOperationSummary
HoursOfOperationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HoursOfOperationSummary' {Maybe Text
id :: Maybe Text
$sel:id:HoursOfOperationSummary' :: HoursOfOperationSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: HoursOfOperationSummary
s@HoursOfOperationSummary' {} Maybe Text
a -> HoursOfOperationSummary
s {$sel:id:HoursOfOperationSummary' :: Maybe Text
id = Maybe Text
a} :: HoursOfOperationSummary)
instance Core.FromJSON HoursOfOperationSummary where
parseJSON :: Value -> Parser HoursOfOperationSummary
parseJSON =
String
-> (Object -> Parser HoursOfOperationSummary)
-> Value
-> Parser HoursOfOperationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HoursOfOperationSummary"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> HoursOfOperationSummary
HoursOfOperationSummary'
(Maybe Text -> Maybe Text -> Maybe Text -> HoursOfOperationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> HoursOfOperationSummary)
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
"Arn")
Parser (Maybe Text -> Maybe Text -> HoursOfOperationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> HoursOfOperationSummary)
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
"Name")
Parser (Maybe Text -> HoursOfOperationSummary)
-> Parser (Maybe Text) -> Parser HoursOfOperationSummary
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
"Id")
)
instance Prelude.Hashable HoursOfOperationSummary
instance Prelude.NFData HoursOfOperationSummary