{-# 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.Scheduler.Types.ScheduleGroupSummary 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
import Amazonka.Scheduler.Types.ScheduleGroupState
data ScheduleGroupSummary = ScheduleGroupSummary'
{
ScheduleGroupSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ScheduleGroupSummary -> Maybe POSIX
creationDate :: Prelude.Maybe Data.POSIX,
ScheduleGroupSummary -> Maybe POSIX
lastModificationDate :: Prelude.Maybe Data.POSIX,
ScheduleGroupSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ScheduleGroupSummary -> Maybe ScheduleGroupState
state :: Prelude.Maybe ScheduleGroupState
}
deriving (ScheduleGroupSummary -> ScheduleGroupSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduleGroupSummary -> ScheduleGroupSummary -> Bool
$c/= :: ScheduleGroupSummary -> ScheduleGroupSummary -> Bool
== :: ScheduleGroupSummary -> ScheduleGroupSummary -> Bool
$c== :: ScheduleGroupSummary -> ScheduleGroupSummary -> Bool
Prelude.Eq, ReadPrec [ScheduleGroupSummary]
ReadPrec ScheduleGroupSummary
Int -> ReadS ScheduleGroupSummary
ReadS [ScheduleGroupSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduleGroupSummary]
$creadListPrec :: ReadPrec [ScheduleGroupSummary]
readPrec :: ReadPrec ScheduleGroupSummary
$creadPrec :: ReadPrec ScheduleGroupSummary
readList :: ReadS [ScheduleGroupSummary]
$creadList :: ReadS [ScheduleGroupSummary]
readsPrec :: Int -> ReadS ScheduleGroupSummary
$creadsPrec :: Int -> ReadS ScheduleGroupSummary
Prelude.Read, Int -> ScheduleGroupSummary -> ShowS
[ScheduleGroupSummary] -> ShowS
ScheduleGroupSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduleGroupSummary] -> ShowS
$cshowList :: [ScheduleGroupSummary] -> ShowS
show :: ScheduleGroupSummary -> String
$cshow :: ScheduleGroupSummary -> String
showsPrec :: Int -> ScheduleGroupSummary -> ShowS
$cshowsPrec :: Int -> ScheduleGroupSummary -> ShowS
Prelude.Show, forall x. Rep ScheduleGroupSummary x -> ScheduleGroupSummary
forall x. ScheduleGroupSummary -> Rep ScheduleGroupSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScheduleGroupSummary x -> ScheduleGroupSummary
$cfrom :: forall x. ScheduleGroupSummary -> Rep ScheduleGroupSummary x
Prelude.Generic)
newScheduleGroupSummary ::
ScheduleGroupSummary
newScheduleGroupSummary :: ScheduleGroupSummary
newScheduleGroupSummary =
ScheduleGroupSummary'
{ $sel:arn:ScheduleGroupSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:ScheduleGroupSummary' :: Maybe POSIX
creationDate = forall a. Maybe a
Prelude.Nothing,
$sel:lastModificationDate:ScheduleGroupSummary' :: Maybe POSIX
lastModificationDate = forall a. Maybe a
Prelude.Nothing,
$sel:name:ScheduleGroupSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:state:ScheduleGroupSummary' :: Maybe ScheduleGroupState
state = forall a. Maybe a
Prelude.Nothing
}
scheduleGroupSummary_arn :: Lens.Lens' ScheduleGroupSummary (Prelude.Maybe Prelude.Text)
scheduleGroupSummary_arn :: Lens' ScheduleGroupSummary (Maybe Text)
scheduleGroupSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleGroupSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ScheduleGroupSummary
s@ScheduleGroupSummary' {} Maybe Text
a -> ScheduleGroupSummary
s {$sel:arn:ScheduleGroupSummary' :: Maybe Text
arn = Maybe Text
a} :: ScheduleGroupSummary)
scheduleGroupSummary_creationDate :: Lens.Lens' ScheduleGroupSummary (Prelude.Maybe Prelude.UTCTime)
scheduleGroupSummary_creationDate :: Lens' ScheduleGroupSummary (Maybe UTCTime)
scheduleGroupSummary_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleGroupSummary' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: ScheduleGroupSummary
s@ScheduleGroupSummary' {} Maybe POSIX
a -> ScheduleGroupSummary
s {$sel:creationDate:ScheduleGroupSummary' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: ScheduleGroupSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
scheduleGroupSummary_lastModificationDate :: Lens.Lens' ScheduleGroupSummary (Prelude.Maybe Prelude.UTCTime)
scheduleGroupSummary_lastModificationDate :: Lens' ScheduleGroupSummary (Maybe UTCTime)
scheduleGroupSummary_lastModificationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleGroupSummary' {Maybe POSIX
lastModificationDate :: Maybe POSIX
$sel:lastModificationDate:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe POSIX
lastModificationDate} -> Maybe POSIX
lastModificationDate) (\s :: ScheduleGroupSummary
s@ScheduleGroupSummary' {} Maybe POSIX
a -> ScheduleGroupSummary
s {$sel:lastModificationDate:ScheduleGroupSummary' :: Maybe POSIX
lastModificationDate = Maybe POSIX
a} :: ScheduleGroupSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
scheduleGroupSummary_name :: Lens.Lens' ScheduleGroupSummary (Prelude.Maybe Prelude.Text)
scheduleGroupSummary_name :: Lens' ScheduleGroupSummary (Maybe Text)
scheduleGroupSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleGroupSummary' {Maybe Text
name :: Maybe Text
$sel:name:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ScheduleGroupSummary
s@ScheduleGroupSummary' {} Maybe Text
a -> ScheduleGroupSummary
s {$sel:name:ScheduleGroupSummary' :: Maybe Text
name = Maybe Text
a} :: ScheduleGroupSummary)
scheduleGroupSummary_state :: Lens.Lens' ScheduleGroupSummary (Prelude.Maybe ScheduleGroupState)
scheduleGroupSummary_state :: Lens' ScheduleGroupSummary (Maybe ScheduleGroupState)
scheduleGroupSummary_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleGroupSummary' {Maybe ScheduleGroupState
state :: Maybe ScheduleGroupState
$sel:state:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe ScheduleGroupState
state} -> Maybe ScheduleGroupState
state) (\s :: ScheduleGroupSummary
s@ScheduleGroupSummary' {} Maybe ScheduleGroupState
a -> ScheduleGroupSummary
s {$sel:state:ScheduleGroupSummary' :: Maybe ScheduleGroupState
state = Maybe ScheduleGroupState
a} :: ScheduleGroupSummary)
instance Data.FromJSON ScheduleGroupSummary where
parseJSON :: Value -> Parser ScheduleGroupSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ScheduleGroupSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ScheduleGroupState
-> ScheduleGroupSummary
ScheduleGroupSummary'
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
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModificationDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"State")
)
instance Prelude.Hashable ScheduleGroupSummary where
hashWithSalt :: Int -> ScheduleGroupSummary -> Int
hashWithSalt Int
_salt ScheduleGroupSummary' {Maybe Text
Maybe POSIX
Maybe ScheduleGroupState
state :: Maybe ScheduleGroupState
name :: Maybe Text
lastModificationDate :: Maybe POSIX
creationDate :: Maybe POSIX
arn :: Maybe Text
$sel:state:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe ScheduleGroupState
$sel:name:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe Text
$sel:lastModificationDate:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe POSIX
$sel:creationDate:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe POSIX
$sel:arn:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModificationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScheduleGroupState
state
instance Prelude.NFData ScheduleGroupSummary where
rnf :: ScheduleGroupSummary -> ()
rnf ScheduleGroupSummary' {Maybe Text
Maybe POSIX
Maybe ScheduleGroupState
state :: Maybe ScheduleGroupState
name :: Maybe Text
lastModificationDate :: Maybe POSIX
creationDate :: Maybe POSIX
arn :: Maybe Text
$sel:state:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe ScheduleGroupState
$sel:name:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe Text
$sel:lastModificationDate:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe POSIX
$sel:creationDate:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe POSIX
$sel:arn:ScheduleGroupSummary' :: ScheduleGroupSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModificationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ScheduleGroupState
state