{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
import Amazonka.Redshift.Types.ScheduleState
data ClusterAssociatedToSchedule = ClusterAssociatedToSchedule'
{ ClusterAssociatedToSchedule -> Maybe ScheduleState
scheduleAssociationState :: Prelude.Maybe ScheduleState,
ClusterAssociatedToSchedule -> Maybe Text
clusterIdentifier :: Prelude.Maybe Prelude.Text
}
deriving (ClusterAssociatedToSchedule -> ClusterAssociatedToSchedule -> Bool
(ClusterAssociatedToSchedule
-> ClusterAssociatedToSchedule -> Bool)
-> (ClusterAssociatedToSchedule
-> ClusterAssociatedToSchedule -> Bool)
-> Eq ClusterAssociatedToSchedule
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]
(Int -> ReadS ClusterAssociatedToSchedule)
-> ReadS [ClusterAssociatedToSchedule]
-> ReadPrec ClusterAssociatedToSchedule
-> ReadPrec [ClusterAssociatedToSchedule]
-> Read 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
(Int -> ClusterAssociatedToSchedule -> ShowS)
-> (ClusterAssociatedToSchedule -> String)
-> ([ClusterAssociatedToSchedule] -> ShowS)
-> Show ClusterAssociatedToSchedule
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.
ClusterAssociatedToSchedule -> Rep ClusterAssociatedToSchedule x)
-> (forall x.
Rep ClusterAssociatedToSchedule x -> ClusterAssociatedToSchedule)
-> Generic ClusterAssociatedToSchedule
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' :: Maybe ScheduleState -> Maybe Text -> ClusterAssociatedToSchedule
ClusterAssociatedToSchedule'
{ $sel:scheduleAssociationState:ClusterAssociatedToSchedule' :: Maybe ScheduleState
scheduleAssociationState =
Maybe ScheduleState
forall a. Maybe a
Prelude.Nothing,
$sel:clusterIdentifier:ClusterAssociatedToSchedule' :: Maybe Text
clusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
clusterAssociatedToSchedule_scheduleAssociationState :: Lens.Lens' ClusterAssociatedToSchedule (Prelude.Maybe ScheduleState)
clusterAssociatedToSchedule_scheduleAssociationState :: (Maybe ScheduleState -> f (Maybe ScheduleState))
-> ClusterAssociatedToSchedule -> f ClusterAssociatedToSchedule
clusterAssociatedToSchedule_scheduleAssociationState = (ClusterAssociatedToSchedule -> Maybe ScheduleState)
-> (ClusterAssociatedToSchedule
-> Maybe ScheduleState -> ClusterAssociatedToSchedule)
-> Lens
ClusterAssociatedToSchedule
ClusterAssociatedToSchedule
(Maybe ScheduleState)
(Maybe ScheduleState)
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)
clusterAssociatedToSchedule_clusterIdentifier :: Lens.Lens' ClusterAssociatedToSchedule (Prelude.Maybe Prelude.Text)
clusterAssociatedToSchedule_clusterIdentifier :: (Maybe Text -> f (Maybe Text))
-> ClusterAssociatedToSchedule -> f ClusterAssociatedToSchedule
clusterAssociatedToSchedule_clusterIdentifier = (ClusterAssociatedToSchedule -> Maybe Text)
-> (ClusterAssociatedToSchedule
-> Maybe Text -> ClusterAssociatedToSchedule)
-> Lens
ClusterAssociatedToSchedule
ClusterAssociatedToSchedule
(Maybe Text)
(Maybe Text)
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)
instance Core.FromXML ClusterAssociatedToSchedule where
parseXML :: [Node] -> Either String ClusterAssociatedToSchedule
parseXML [Node]
x =
Maybe ScheduleState -> Maybe Text -> ClusterAssociatedToSchedule
ClusterAssociatedToSchedule'
(Maybe ScheduleState -> Maybe Text -> ClusterAssociatedToSchedule)
-> Either String (Maybe ScheduleState)
-> Either String (Maybe Text -> ClusterAssociatedToSchedule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ScheduleState)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ScheduleAssociationState")
Either String (Maybe Text -> ClusterAssociatedToSchedule)
-> Either String (Maybe Text)
-> Either String ClusterAssociatedToSchedule
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ClusterIdentifier")
instance Prelude.Hashable ClusterAssociatedToSchedule
instance Prelude.NFData ClusterAssociatedToSchedule