{-# 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.Redshift.Types.ClusterAssociatedToSchedule 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.Redshift.Internal
import Amazonka.Redshift.Types.ScheduleState
data ClusterAssociatedToSchedule = ClusterAssociatedToSchedule'
{ ClusterAssociatedToSchedule -> Maybe Text
clusterIdentifier :: Prelude.Maybe Prelude.Text,
ClusterAssociatedToSchedule -> Maybe ScheduleState
scheduleAssociationState :: Prelude.Maybe ScheduleState
}
deriving (ClusterAssociatedToSchedule -> ClusterAssociatedToSchedule -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterAssociatedToSchedule -> ClusterAssociatedToSchedule -> Bool
$c/= :: ClusterAssociatedToSchedule -> ClusterAssociatedToSchedule -> Bool
== :: ClusterAssociatedToSchedule -> ClusterAssociatedToSchedule -> Bool
$c== :: ClusterAssociatedToSchedule -> ClusterAssociatedToSchedule -> Bool
Prelude.Eq, ReadPrec [ClusterAssociatedToSchedule]
ReadPrec ClusterAssociatedToSchedule
Int -> ReadS ClusterAssociatedToSchedule
ReadS [ClusterAssociatedToSchedule]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterAssociatedToSchedule]
$creadListPrec :: ReadPrec [ClusterAssociatedToSchedule]
readPrec :: ReadPrec ClusterAssociatedToSchedule
$creadPrec :: ReadPrec ClusterAssociatedToSchedule
readList :: ReadS [ClusterAssociatedToSchedule]
$creadList :: ReadS [ClusterAssociatedToSchedule]
readsPrec :: Int -> ReadS ClusterAssociatedToSchedule
$creadsPrec :: Int -> ReadS ClusterAssociatedToSchedule
Prelude.Read, Int -> ClusterAssociatedToSchedule -> ShowS
[ClusterAssociatedToSchedule] -> ShowS
ClusterAssociatedToSchedule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterAssociatedToSchedule] -> ShowS
$cshowList :: [ClusterAssociatedToSchedule] -> ShowS
show :: ClusterAssociatedToSchedule -> String
$cshow :: ClusterAssociatedToSchedule -> String
showsPrec :: Int -> ClusterAssociatedToSchedule -> ShowS
$cshowsPrec :: Int -> ClusterAssociatedToSchedule -> ShowS
Prelude.Show, forall x.
Rep ClusterAssociatedToSchedule x -> ClusterAssociatedToSchedule
forall x.
ClusterAssociatedToSchedule -> Rep ClusterAssociatedToSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ClusterAssociatedToSchedule x -> ClusterAssociatedToSchedule
$cfrom :: forall x.
ClusterAssociatedToSchedule -> Rep ClusterAssociatedToSchedule x
Prelude.Generic)
newClusterAssociatedToSchedule ::
ClusterAssociatedToSchedule
newClusterAssociatedToSchedule :: ClusterAssociatedToSchedule
newClusterAssociatedToSchedule =
ClusterAssociatedToSchedule'
{ $sel:clusterIdentifier:ClusterAssociatedToSchedule' :: Maybe Text
clusterIdentifier =
forall a. Maybe a
Prelude.Nothing,
$sel:scheduleAssociationState:ClusterAssociatedToSchedule' :: Maybe ScheduleState
scheduleAssociationState = forall a. Maybe a
Prelude.Nothing
}
clusterAssociatedToSchedule_clusterIdentifier :: Lens.Lens' ClusterAssociatedToSchedule (Prelude.Maybe Prelude.Text)
clusterAssociatedToSchedule_clusterIdentifier :: Lens' ClusterAssociatedToSchedule (Maybe Text)
clusterAssociatedToSchedule_clusterIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterAssociatedToSchedule' {Maybe Text
clusterIdentifier :: Maybe Text
$sel:clusterIdentifier:ClusterAssociatedToSchedule' :: ClusterAssociatedToSchedule -> Maybe Text
clusterIdentifier} -> Maybe Text
clusterIdentifier) (\s :: ClusterAssociatedToSchedule
s@ClusterAssociatedToSchedule' {} Maybe Text
a -> ClusterAssociatedToSchedule
s {$sel:clusterIdentifier:ClusterAssociatedToSchedule' :: Maybe Text
clusterIdentifier = Maybe Text
a} :: ClusterAssociatedToSchedule)
clusterAssociatedToSchedule_scheduleAssociationState :: Lens.Lens' ClusterAssociatedToSchedule (Prelude.Maybe ScheduleState)
clusterAssociatedToSchedule_scheduleAssociationState :: Lens' ClusterAssociatedToSchedule (Maybe ScheduleState)
clusterAssociatedToSchedule_scheduleAssociationState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterAssociatedToSchedule' {Maybe ScheduleState
scheduleAssociationState :: Maybe ScheduleState
$sel:scheduleAssociationState:ClusterAssociatedToSchedule' :: ClusterAssociatedToSchedule -> Maybe ScheduleState
scheduleAssociationState} -> Maybe ScheduleState
scheduleAssociationState) (\s :: ClusterAssociatedToSchedule
s@ClusterAssociatedToSchedule' {} Maybe ScheduleState
a -> ClusterAssociatedToSchedule
s {$sel:scheduleAssociationState:ClusterAssociatedToSchedule' :: Maybe ScheduleState
scheduleAssociationState = Maybe ScheduleState
a} :: ClusterAssociatedToSchedule)
instance Data.FromXML ClusterAssociatedToSchedule where
parseXML :: [Node] -> Either String ClusterAssociatedToSchedule
parseXML [Node]
x =
Maybe Text -> Maybe ScheduleState -> ClusterAssociatedToSchedule
ClusterAssociatedToSchedule'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ClusterIdentifier")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ScheduleAssociationState")
instance Prelude.Hashable ClusterAssociatedToSchedule where
hashWithSalt :: Int -> ClusterAssociatedToSchedule -> Int
hashWithSalt Int
_salt ClusterAssociatedToSchedule' {Maybe Text
Maybe ScheduleState
scheduleAssociationState :: Maybe ScheduleState
clusterIdentifier :: Maybe Text
$sel:scheduleAssociationState:ClusterAssociatedToSchedule' :: ClusterAssociatedToSchedule -> Maybe ScheduleState
$sel:clusterIdentifier:ClusterAssociatedToSchedule' :: ClusterAssociatedToSchedule -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScheduleState
scheduleAssociationState
instance Prelude.NFData ClusterAssociatedToSchedule where
rnf :: ClusterAssociatedToSchedule -> ()
rnf ClusterAssociatedToSchedule' {Maybe Text
Maybe ScheduleState
scheduleAssociationState :: Maybe ScheduleState
clusterIdentifier :: Maybe Text
$sel:scheduleAssociationState:ClusterAssociatedToSchedule' :: ClusterAssociatedToSchedule -> Maybe ScheduleState
$sel:clusterIdentifier:ClusterAssociatedToSchedule' :: ClusterAssociatedToSchedule -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ScheduleState
scheduleAssociationState